
  ___  ____  ____  ____  ____ ®
 /__    /   ____/   /   ____/      Stata 18.0
___/   /   /___/   /   /___/       MP—Parallel Edition

 Statistics and Data Science       Copyright 1985-2023 StataCorp LLC
                                   StataCorp
                                   4905 Lakeway Drive
                                   College Station, Texas 77845 USA
                                   800-782-8272        https://www.stata.com
                                   979-696-4600        service@stata.com

Stata license: 745-user 2-core network, expiring 30 Jun 2025
Serial number: 501809309429
  Licensed to: Noah Sobel-Lewin
               University of Chicago

Notes:
      1. Stata is running in batch mode.
      2. Unicode is supported; see help unicode_advice.
      3. More than 2 billion observations are allowed; see help obs_advice.
      4. Maximum number of variables is set to 5,000 but can be increased;
          see help set_maxvar.

. do 01Code/emissions/00MainStata.do 

. clear all

. clear matrix

. set more off

. set linesize 255

. pause on

. version 15

. 
. ** This will be called from the top level of the entire replication
. global CODE_DIR = "01Code/emissions"

. 
. global CEMS_DATA_IN = "00RawData/cems"

. global BASELINE_DATA_IN = "00RawData/baseline"

. global BASELINE_DATA_OUT = "02DataPipeline/baseline"

. global EMISSIONS_DATA_IN = "00RawData/emissions"

. global IMPUTATION_DATA_OUT = "02DataPipeline/emissions/imputation"

. global EMISSIONS_DATA_OUT = "02DataPipeline/emissions"

. 
. global EMISSIONS_TABS="03Output/tables"

. global EMISSIONS_FIGS="03Output/figures"

. 
. ** We use a conversion rate of USD 1 to INR 70, as of 2 Jan 2019, 
. ** Source: The Fed (https://www.federalreserve.gov/releases/h10/20190107/)
. global USD2INR=70

. 
. ********************************************************************************
. 
. * Conduct pollution imputation
. do "$CODE_DIR/imputation/2. Create PM Mass (Stack-week).do"

. /*******************************************************************************
>            Project: ETS
>            Purpose: Create the dependent variable for regression, PLANT-MONTH KG 
>            EMISSIONS (KG/MONTH), without further imputation than within-stack, week
>            
>            Note: Imputationis executed as follows:
> 
>            1) Missing values of Stack day kg/hr are imputed with the stack's 
>            own week mean kg/hr.
>    ****************************************************************************/
. 
. set more off

. clear all

. pause on

. 
. *-------------------------------------------------------------------------------
. 
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. drop if date < date("2019jan16", "YMD")
(0 observations deleted)

. format date %tddd-Mon-YY

. sort date composite_id

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        337        0.14        0.14
  17-Apr-19 |        337        0.14        0.28
  18-Apr-19 |        337        0.14        0.42
  19-Apr-19 |        337        0.14        0.56
  20-Apr-19 |        337        0.14        0.70
  21-Apr-19 |        337        0.14        0.83
  22-Apr-19 |        337        0.14        0.97
  23-Apr-19 |        337        0.14        1.11
  24-Apr-19 |        337        0.14        1.25
  25-Apr-19 |        337        0.14        1.39
  26-Apr-19 |        337        0.14        1.53
  27-Apr-19 |        337        0.14        1.67
  28-Apr-19 |        337        0.14        1.81
  29-Apr-19 |        337        0.14        1.95
  30-Apr-19 |        337        0.14        2.09
   1-May-19 |        337        0.14        2.23
   2-May-19 |        337        0.14        2.36
   3-May-19 |        337        0.14        2.50
   4-May-19 |        337        0.14        2.64
   5-May-19 |        337        0.14        2.78
   6-May-19 |        337        0.14        2.92
   7-May-19 |        337        0.14        3.06
   8-May-19 |        337        0.14        3.20
   9-May-19 |        337        0.14        3.34
  10-May-19 |        337        0.14        3.48
  11-May-19 |        337        0.14        3.62
  12-May-19 |        337        0.14        3.76
  13-May-19 |        337        0.14        3.89
  14-May-19 |        337        0.14        4.03
  15-May-19 |        337        0.14        4.17
  16-May-19 |        337        0.14        4.31
  17-May-19 |        337        0.14        4.45
  18-May-19 |        337        0.14        4.59
  19-May-19 |        337        0.14        4.73
  20-May-19 |        337        0.14        4.87
  21-May-19 |        337        0.14        5.01
  22-May-19 |        337        0.14        5.15
  23-May-19 |        337        0.14        5.29
  24-May-19 |        337        0.14        5.42
  25-May-19 |        337        0.14        5.56
  26-May-19 |        337        0.14        5.70
  27-May-19 |        337        0.14        5.84
  28-May-19 |        337        0.14        5.98
  29-May-19 |        337        0.14        6.12
  30-May-19 |        337        0.14        6.26
  31-May-19 |        337        0.14        6.40
   1-Jun-19 |        337        0.14        6.54
   2-Jun-19 |        337        0.14        6.68
   3-Jun-19 |        337        0.14        6.82
   4-Jun-19 |        337        0.14        6.95
   5-Jun-19 |        337        0.14        7.09
   6-Jun-19 |        337        0.14        7.23
   7-Jun-19 |        337        0.14        7.37
   8-Jun-19 |        337        0.14        7.51
   9-Jun-19 |        337        0.14        7.65
  10-Jun-19 |        337        0.14        7.79
  11-Jun-19 |        337        0.14        7.93
  12-Jun-19 |        337        0.14        8.07
  13-Jun-19 |        337        0.14        8.21
  14-Jun-19 |        337        0.14        8.34
  15-Jun-19 |        337        0.14        8.48
  16-Jun-19 |        337        0.14        8.62
  17-Jun-19 |        337        0.14        8.76
  18-Jun-19 |        337        0.14        8.90
  19-Jun-19 |        337        0.14        9.04
  20-Jun-19 |        337        0.14        9.18
  21-Jun-19 |        337        0.14        9.32
  22-Jun-19 |        337        0.14        9.46
  23-Jun-19 |        337        0.14        9.60
  24-Jun-19 |        337        0.14        9.74
  25-Jun-19 |        337        0.14        9.87
  26-Jun-19 |        337        0.14       10.01
  27-Jun-19 |        337        0.14       10.15
  28-Jun-19 |        337        0.14       10.29
  29-Jun-19 |        337        0.14       10.43
  30-Jun-19 |        337        0.14       10.57
   1-Jul-19 |        337        0.14       10.71
   2-Jul-19 |        337        0.14       10.85
   3-Jul-19 |        337        0.14       10.99
   4-Jul-19 |        337        0.14       11.13
   5-Jul-19 |        337        0.14       11.27
   6-Jul-19 |        337        0.14       11.40
   7-Jul-19 |        337        0.14       11.54
   8-Jul-19 |        337        0.14       11.68
   9-Jul-19 |        337        0.14       11.82
  10-Jul-19 |        337        0.14       11.96
  11-Jul-19 |        337        0.14       12.10
  12-Jul-19 |        337        0.14       12.24
  13-Jul-19 |        337        0.14       12.38
  14-Jul-19 |        337        0.14       12.52
  15-Jul-19 |        337        0.14       12.66
  16-Jul-19 |        337        0.14       12.80
  17-Jul-19 |        337        0.14       12.93
  18-Jul-19 |        337        0.14       13.07
  19-Jul-19 |        337        0.14       13.21
  20-Jul-19 |        337        0.14       13.35
  21-Jul-19 |        337        0.14       13.49
  22-Jul-19 |        337        0.14       13.63
  23-Jul-19 |        337        0.14       13.77
  24-Jul-19 |        337        0.14       13.91
  25-Jul-19 |        337        0.14       14.05
  26-Jul-19 |        337        0.14       14.19
  27-Jul-19 |        337        0.14       14.33
  28-Jul-19 |        337        0.14       14.46
  29-Jul-19 |        337        0.14       14.60
  30-Jul-19 |        337        0.14       14.74
  31-Jul-19 |        337        0.14       14.88
   1-Aug-19 |        337        0.14       15.02
   2-Aug-19 |        337        0.14       15.16
   3-Aug-19 |        337        0.14       15.30
   4-Aug-19 |        337        0.14       15.44
   5-Aug-19 |        337        0.14       15.58
   6-Aug-19 |        337        0.14       15.72
   7-Aug-19 |        337        0.14       15.86
   8-Aug-19 |        337        0.14       15.99
   9-Aug-19 |        337        0.14       16.13
  10-Aug-19 |        337        0.14       16.27
  11-Aug-19 |        337        0.14       16.41
  12-Aug-19 |        337        0.14       16.55
  13-Aug-19 |        337        0.14       16.69
  14-Aug-19 |        337        0.14       16.83
  15-Aug-19 |        337        0.14       16.97
  16-Aug-19 |        337        0.14       17.11
  17-Aug-19 |        337        0.14       17.25
  18-Aug-19 |        337        0.14       17.39
  19-Aug-19 |        337        0.14       17.52
  20-Aug-19 |        337        0.14       17.66
  21-Aug-19 |        337        0.14       17.80
  22-Aug-19 |        337        0.14       17.94
  23-Aug-19 |        337        0.14       18.08
  24-Aug-19 |        337        0.14       18.22
  25-Aug-19 |        337        0.14       18.36
  26-Aug-19 |        337        0.14       18.50
  27-Aug-19 |        337        0.14       18.64
  28-Aug-19 |        337        0.14       18.78
  29-Aug-19 |        337        0.14       18.92
  30-Aug-19 |        337        0.14       19.05
  31-Aug-19 |        337        0.14       19.19
   1-Sep-19 |        337        0.14       19.33
   2-Sep-19 |        337        0.14       19.47
   3-Sep-19 |        337        0.14       19.61
   4-Sep-19 |        337        0.14       19.75
   5-Sep-19 |        337        0.14       19.89
   6-Sep-19 |        337        0.14       20.03
   7-Sep-19 |        337        0.14       20.17
   8-Sep-19 |        337        0.14       20.31
   9-Sep-19 |        337        0.14       20.45
  10-Sep-19 |        337        0.14       20.58
  11-Sep-19 |        337        0.14       20.72
  12-Sep-19 |        337        0.14       20.86
  13-Sep-19 |        337        0.14       21.00
  14-Sep-19 |        337        0.14       21.14
  15-Sep-19 |        337        0.14       21.28
  16-Sep-19 |        337        0.14       21.42
  17-Sep-19 |        337        0.14       21.56
  18-Sep-19 |        337        0.14       21.70
  19-Sep-19 |        337        0.14       21.84
  20-Sep-19 |        337        0.14       21.97
  21-Sep-19 |        337        0.14       22.11
  22-Sep-19 |        337        0.14       22.25
  23-Sep-19 |        337        0.14       22.39
  24-Sep-19 |        337        0.14       22.53
  25-Sep-19 |        337        0.14       22.67
  26-Sep-19 |        337        0.14       22.81
  27-Sep-19 |        337        0.14       22.95
  28-Sep-19 |        337        0.14       23.09
  29-Sep-19 |        337        0.14       23.23
  30-Sep-19 |        337        0.14       23.37
   1-Oct-19 |        337        0.14       23.50
   2-Oct-19 |        337        0.14       23.64
   3-Oct-19 |        337        0.14       23.78
   4-Oct-19 |        337        0.14       23.92
   5-Oct-19 |        337        0.14       24.06
   6-Oct-19 |        337        0.14       24.20
   7-Oct-19 |        337        0.14       24.34
   8-Oct-19 |        337        0.14       24.48
   9-Oct-19 |        337        0.14       24.62
  10-Oct-19 |        337        0.14       24.76
  11-Oct-19 |        337        0.14       24.90
  12-Oct-19 |        337        0.14       25.03
  13-Oct-19 |        337        0.14       25.17
  14-Oct-19 |        337        0.14       25.31
  15-Oct-19 |        337        0.14       25.45
  16-Oct-19 |        337        0.14       25.59
  17-Oct-19 |        337        0.14       25.73
  18-Oct-19 |        337        0.14       25.87
  19-Oct-19 |        337        0.14       26.01
  20-Oct-19 |        337        0.14       26.15
  21-Oct-19 |        337        0.14       26.29
  22-Oct-19 |        337        0.14       26.43
  23-Oct-19 |        337        0.14       26.56
  24-Oct-19 |        337        0.14       26.70
  25-Oct-19 |        337        0.14       26.84
  26-Oct-19 |        337        0.14       26.98
  27-Oct-19 |        337        0.14       27.12
  28-Oct-19 |        337        0.14       27.26
  29-Oct-19 |        337        0.14       27.40
  30-Oct-19 |        337        0.14       27.54
  31-Oct-19 |        337        0.14       27.68
   1-Nov-19 |        337        0.14       27.82
   2-Nov-19 |        337        0.14       27.96
   3-Nov-19 |        337        0.14       28.09
   4-Nov-19 |        337        0.14       28.23
   5-Nov-19 |        337        0.14       28.37
   6-Nov-19 |        337        0.14       28.51
   7-Nov-19 |        337        0.14       28.65
   8-Nov-19 |        337        0.14       28.79
   9-Nov-19 |        337        0.14       28.93
  10-Nov-19 |        337        0.14       29.07
  11-Nov-19 |        337        0.14       29.21
  12-Nov-19 |        337        0.14       29.35
  13-Nov-19 |        337        0.14       29.49
  14-Nov-19 |        337        0.14       29.62
  15-Nov-19 |        337        0.14       29.76
  16-Nov-19 |        337        0.14       29.90
  17-Nov-19 |        337        0.14       30.04
  18-Nov-19 |        337        0.14       30.18
  19-Nov-19 |        337        0.14       30.32
  20-Nov-19 |        337        0.14       30.46
  21-Nov-19 |        337        0.14       30.60
  22-Nov-19 |        337        0.14       30.74
  23-Nov-19 |        337        0.14       30.88
  24-Nov-19 |        337        0.14       31.02
  25-Nov-19 |        337        0.14       31.15
  26-Nov-19 |        337        0.14       31.29
  27-Nov-19 |        337        0.14       31.43
  28-Nov-19 |        337        0.14       31.57
  29-Nov-19 |        337        0.14       31.71
  30-Nov-19 |        337        0.14       31.85
   1-Dec-19 |        337        0.14       31.99
   2-Dec-19 |        337        0.14       32.13
   3-Dec-19 |        337        0.14       32.27
   4-Dec-19 |        337        0.14       32.41
   5-Dec-19 |        337        0.14       32.55
   6-Dec-19 |        337        0.14       32.68
   7-Dec-19 |        337        0.14       32.82
   8-Dec-19 |        337        0.14       32.96
   9-Dec-19 |        337        0.14       33.10
  10-Dec-19 |        337        0.14       33.24
  11-Dec-19 |        337        0.14       33.38
  12-Dec-19 |        337        0.14       33.52
  13-Dec-19 |        337        0.14       33.66
  14-Dec-19 |        337        0.14       33.80
  15-Dec-19 |        337        0.14       33.94
  16-Dec-19 |        337        0.14       34.08
  17-Dec-19 |        337        0.14       34.21
  18-Dec-19 |        337        0.14       34.35
  19-Dec-19 |        337        0.14       34.49
  20-Dec-19 |        337        0.14       34.63
  21-Dec-19 |        337        0.14       34.77
  22-Dec-19 |        337        0.14       34.91
  23-Dec-19 |        337        0.14       35.05
  24-Dec-19 |        337        0.14       35.19
  25-Dec-19 |        337        0.14       35.33
  26-Dec-19 |        337        0.14       35.47
  27-Dec-19 |        337        0.14       35.61
  28-Dec-19 |        337        0.14       35.74
  29-Dec-19 |        337        0.14       35.88
  30-Dec-19 |        337        0.14       36.02
  31-Dec-19 |        337        0.14       36.16
   1-Jan-20 |        337        0.14       36.30
   2-Jan-20 |        337        0.14       36.44
   3-Jan-20 |        337        0.14       36.58
   4-Jan-20 |        337        0.14       36.72
   5-Jan-20 |        337        0.14       36.86
   6-Jan-20 |        337        0.14       37.00
   7-Jan-20 |        337        0.14       37.13
   8-Jan-20 |        337        0.14       37.27
   9-Jan-20 |        337        0.14       37.41
  10-Jan-20 |        337        0.14       37.55
  11-Jan-20 |        337        0.14       37.69
  12-Jan-20 |        337        0.14       37.83
  13-Jan-20 |        337        0.14       37.97
  14-Jan-20 |        337        0.14       38.11
  15-Jan-20 |        337        0.14       38.25
  16-Jan-20 |        337        0.14       38.39
  17-Jan-20 |        337        0.14       38.53
  18-Jan-20 |        337        0.14       38.66
  19-Jan-20 |        337        0.14       38.80
  20-Jan-20 |        337        0.14       38.94
  21-Jan-20 |        337        0.14       39.08
  22-Jan-20 |        337        0.14       39.22
  23-Jan-20 |        337        0.14       39.36
  24-Jan-20 |        337        0.14       39.50
  25-Jan-20 |        337        0.14       39.64
  26-Jan-20 |        337        0.14       39.78
  27-Jan-20 |        337        0.14       39.92
  28-Jan-20 |        337        0.14       40.06
  29-Jan-20 |        337        0.14       40.19
  30-Jan-20 |        337        0.14       40.33
  31-Jan-20 |        337        0.14       40.47
   1-Feb-20 |        337        0.14       40.61
   2-Feb-20 |        337        0.14       40.75
   3-Feb-20 |        337        0.14       40.89
   4-Feb-20 |        337        0.14       41.03
   5-Feb-20 |        337        0.14       41.17
   6-Feb-20 |        337        0.14       41.31
   7-Feb-20 |        337        0.14       41.45
   8-Feb-20 |        337        0.14       41.59
   9-Feb-20 |        337        0.14       41.72
  10-Feb-20 |        337        0.14       41.86
  11-Feb-20 |        337        0.14       42.00
  12-Feb-20 |        337        0.14       42.14
  13-Feb-20 |        337        0.14       42.28
  14-Feb-20 |        337        0.14       42.42
  15-Feb-20 |        337        0.14       42.56
  16-Feb-20 |        337        0.14       42.70
  17-Feb-20 |        337        0.14       42.84
  18-Feb-20 |        337        0.14       42.98
  19-Feb-20 |        337        0.14       43.12
  20-Feb-20 |        337        0.14       43.25
  21-Feb-20 |        337        0.14       43.39
  22-Feb-20 |        337        0.14       43.53
  23-Feb-20 |        337        0.14       43.67
  24-Feb-20 |        337        0.14       43.81
  25-Feb-20 |        337        0.14       43.95
  26-Feb-20 |        337        0.14       44.09
  27-Feb-20 |        337        0.14       44.23
  28-Feb-20 |        337        0.14       44.37
  29-Feb-20 |        337        0.14       44.51
   1-Mar-20 |        337        0.14       44.65
   2-Mar-20 |        337        0.14       44.78
   3-Mar-20 |        337        0.14       44.92
   4-Mar-20 |        337        0.14       45.06
   5-Mar-20 |        337        0.14       45.20
   6-Mar-20 |        337        0.14       45.34
   7-Mar-20 |        337        0.14       45.48
   8-Mar-20 |        337        0.14       45.62
   9-Mar-20 |        337        0.14       45.76
  10-Mar-20 |        337        0.14       45.90
  11-Mar-20 |        337        0.14       46.04
  12-Mar-20 |        337        0.14       46.18
  13-Mar-20 |        337        0.14       46.31
  14-Mar-20 |        337        0.14       46.45
  15-Mar-20 |        337        0.14       46.59
  16-Mar-20 |        337        0.14       46.73
  17-Mar-20 |        337        0.14       46.87
  18-Mar-20 |        337        0.14       47.01
  19-Mar-20 |        337        0.14       47.15
  20-Mar-20 |        337        0.14       47.29
  21-Mar-20 |        337        0.14       47.43
  22-Mar-20 |        337        0.14       47.57
  23-Mar-20 |        337        0.14       47.71
  24-Mar-20 |        337        0.14       47.84
  25-Mar-20 |        337        0.14       47.98
  26-Mar-20 |        337        0.14       48.12
  27-Mar-20 |        337        0.14       48.26
  28-Mar-20 |        337        0.14       48.40
  29-Mar-20 |        337        0.14       48.54
  30-Mar-20 |        337        0.14       48.68
  31-Mar-20 |        337        0.14       48.82
   1-Apr-20 |        337        0.14       48.96
   2-Apr-20 |        337        0.14       49.10
   3-Apr-20 |        337        0.14       49.24
   4-Apr-20 |        337        0.14       49.37
   5-Apr-20 |        337        0.14       49.51
   6-Apr-20 |        337        0.14       49.65
   7-Apr-20 |        337        0.14       49.79
   8-Apr-20 |        337        0.14       49.93
   9-Apr-20 |        337        0.14       50.07
  10-Apr-20 |        337        0.14       50.21
  11-Apr-20 |        337        0.14       50.35
  12-Apr-20 |        337        0.14       50.49
  13-Apr-20 |        337        0.14       50.63
  14-Apr-20 |        337        0.14       50.76
  15-Apr-20 |        337        0.14       50.90
  16-Apr-20 |        337        0.14       51.04
  17-Apr-20 |        337        0.14       51.18
  18-Apr-20 |        337        0.14       51.32
  19-Apr-20 |        337        0.14       51.46
  20-Apr-20 |        337        0.14       51.60
  21-Apr-20 |        337        0.14       51.74
  22-Apr-20 |        337        0.14       51.88
  23-Apr-20 |        337        0.14       52.02
  24-Apr-20 |        337        0.14       52.16
  25-Apr-20 |        337        0.14       52.29
  26-Apr-20 |        337        0.14       52.43
  27-Apr-20 |        337        0.14       52.57
  28-Apr-20 |        337        0.14       52.71
  29-Apr-20 |        337        0.14       52.85
  30-Apr-20 |        337        0.14       52.99
   1-May-20 |        337        0.14       53.13
   2-May-20 |        337        0.14       53.27
   3-May-20 |        337        0.14       53.41
   4-May-20 |        337        0.14       53.55
   5-May-20 |        337        0.14       53.69
   6-May-20 |        337        0.14       53.82
   7-May-20 |        337        0.14       53.96
   8-May-20 |        337        0.14       54.10
   9-May-20 |        337        0.14       54.24
  10-May-20 |        337        0.14       54.38
  11-May-20 |        337        0.14       54.52
  12-May-20 |        337        0.14       54.66
  13-May-20 |        337        0.14       54.80
  14-May-20 |        337        0.14       54.94
  15-May-20 |        337        0.14       55.08
  16-May-20 |        337        0.14       55.22
  17-May-20 |        337        0.14       55.35
  18-May-20 |        337        0.14       55.49
  19-May-20 |        337        0.14       55.63
  20-May-20 |        337        0.14       55.77
  21-May-20 |        337        0.14       55.91
  22-May-20 |        337        0.14       56.05
  23-May-20 |        337        0.14       56.19
  24-May-20 |        337        0.14       56.33
  25-May-20 |        337        0.14       56.47
  26-May-20 |        337        0.14       56.61
  27-May-20 |        337        0.14       56.75
  28-May-20 |        337        0.14       56.88
  29-May-20 |        337        0.14       57.02
  30-May-20 |        337        0.14       57.16
  31-May-20 |        337        0.14       57.30
   1-Jun-20 |        337        0.14       57.44
   2-Jun-20 |        337        0.14       57.58
   3-Jun-20 |        337        0.14       57.72
   4-Jun-20 |        337        0.14       57.86
   5-Jun-20 |        337        0.14       58.00
   6-Jun-20 |        337        0.14       58.14
   7-Jun-20 |        337        0.14       58.28
   8-Jun-20 |        337        0.14       58.41
   9-Jun-20 |        337        0.14       58.55
  10-Jun-20 |        337        0.14       58.69
  11-Jun-20 |        337        0.14       58.83
  12-Jun-20 |        337        0.14       58.97
  13-Jun-20 |        337        0.14       59.11
  14-Jun-20 |        337        0.14       59.25
  15-Jun-20 |        337        0.14       59.39
  16-Jun-20 |        337        0.14       59.53
  17-Jun-20 |        337        0.14       59.67
  18-Jun-20 |        337        0.14       59.81
  19-Jun-20 |        337        0.14       59.94
  20-Jun-20 |        337        0.14       60.08
  21-Jun-20 |        337        0.14       60.22
  22-Jun-20 |        337        0.14       60.36
  23-Jun-20 |        337        0.14       60.50
  24-Jun-20 |        337        0.14       60.64
  25-Jun-20 |        337        0.14       60.78
  26-Jun-20 |        337        0.14       60.92
  27-Jun-20 |        337        0.14       61.06
  28-Jun-20 |        337        0.14       61.20
  29-Jun-20 |        337        0.14       61.34
  30-Jun-20 |        337        0.14       61.47
   1-Jul-20 |        337        0.14       61.61
   2-Jul-20 |        337        0.14       61.75
   3-Jul-20 |        337        0.14       61.89
   4-Jul-20 |        337        0.14       62.03
   5-Jul-20 |        337        0.14       62.17
   6-Jul-20 |        337        0.14       62.31
   7-Jul-20 |        337        0.14       62.45
   8-Jul-20 |        337        0.14       62.59
   9-Jul-20 |        337        0.14       62.73
  10-Jul-20 |        337        0.14       62.87
  11-Jul-20 |        337        0.14       63.00
  12-Jul-20 |        337        0.14       63.14
  13-Jul-20 |        337        0.14       63.28
  14-Jul-20 |        337        0.14       63.42
  15-Jul-20 |        337        0.14       63.56
  16-Jul-20 |        337        0.14       63.70
  17-Jul-20 |        337        0.14       63.84
  18-Jul-20 |        337        0.14       63.98
  19-Jul-20 |        337        0.14       64.12
  20-Jul-20 |        337        0.14       64.26
  21-Jul-20 |        337        0.14       64.39
  22-Jul-20 |        337        0.14       64.53
  23-Jul-20 |        337        0.14       64.67
  24-Jul-20 |        337        0.14       64.81
  25-Jul-20 |        337        0.14       64.95
  26-Jul-20 |        337        0.14       65.09
  27-Jul-20 |        337        0.14       65.23
  28-Jul-20 |        337        0.14       65.37
  29-Jul-20 |        337        0.14       65.51
  30-Jul-20 |        337        0.14       65.65
  31-Jul-20 |        337        0.14       65.79
   1-Aug-20 |        337        0.14       65.92
   2-Aug-20 |        337        0.14       66.06
   3-Aug-20 |        337        0.14       66.20
   4-Aug-20 |        337        0.14       66.34
   5-Aug-20 |        337        0.14       66.48
   6-Aug-20 |        337        0.14       66.62
   7-Aug-20 |        337        0.14       66.76
   8-Aug-20 |        337        0.14       66.90
   9-Aug-20 |        337        0.14       67.04
  10-Aug-20 |        337        0.14       67.18
  11-Aug-20 |        337        0.14       67.32
  12-Aug-20 |        337        0.14       67.45
  13-Aug-20 |        337        0.14       67.59
  14-Aug-20 |        337        0.14       67.73
  15-Aug-20 |        337        0.14       67.87
  16-Aug-20 |        337        0.14       68.01
  17-Aug-20 |        337        0.14       68.15
  18-Aug-20 |        337        0.14       68.29
  19-Aug-20 |        337        0.14       68.43
  20-Aug-20 |        337        0.14       68.57
  21-Aug-20 |        337        0.14       68.71
  22-Aug-20 |        337        0.14       68.85
  23-Aug-20 |        337        0.14       68.98
  24-Aug-20 |        337        0.14       69.12
  25-Aug-20 |        337        0.14       69.26
  26-Aug-20 |        337        0.14       69.40
  27-Aug-20 |        337        0.14       69.54
  28-Aug-20 |        337        0.14       69.68
  29-Aug-20 |        337        0.14       69.82
  30-Aug-20 |        337        0.14       69.96
  31-Aug-20 |        337        0.14       70.10
   1-Sep-20 |        337        0.14       70.24
   2-Sep-20 |        337        0.14       70.38
   3-Sep-20 |        337        0.14       70.51
   4-Sep-20 |        337        0.14       70.65
   5-Sep-20 |        337        0.14       70.79
   6-Sep-20 |        337        0.14       70.93
   7-Sep-20 |        337        0.14       71.07
   8-Sep-20 |        337        0.14       71.21
   9-Sep-20 |        337        0.14       71.35
  10-Sep-20 |        337        0.14       71.49
  11-Sep-20 |        337        0.14       71.63
  12-Sep-20 |        337        0.14       71.77
  13-Sep-20 |        337        0.14       71.91
  14-Sep-20 |        337        0.14       72.04
  15-Sep-20 |        337        0.14       72.18
  16-Sep-20 |        337        0.14       72.32
  17-Sep-20 |        337        0.14       72.46
  18-Sep-20 |        337        0.14       72.60
  19-Sep-20 |        337        0.14       72.74
  20-Sep-20 |        337        0.14       72.88
  21-Sep-20 |        337        0.14       73.02
  22-Sep-20 |        337        0.14       73.16
  23-Sep-20 |        337        0.14       73.30
  24-Sep-20 |        337        0.14       73.44
  25-Sep-20 |        337        0.14       73.57
  26-Sep-20 |        337        0.14       73.71
  27-Sep-20 |        337        0.14       73.85
  28-Sep-20 |        337        0.14       73.99
  29-Sep-20 |        337        0.14       74.13
  30-Sep-20 |        337        0.14       74.27
   1-Oct-20 |        337        0.14       74.41
   2-Oct-20 |        337        0.14       74.55
   3-Oct-20 |        337        0.14       74.69
   4-Oct-20 |        337        0.14       74.83
   5-Oct-20 |        337        0.14       74.97
   6-Oct-20 |        337        0.14       75.10
   7-Oct-20 |        337        0.14       75.24
   8-Oct-20 |        337        0.14       75.38
   9-Oct-20 |        337        0.14       75.52
  10-Oct-20 |        337        0.14       75.66
  11-Oct-20 |        337        0.14       75.80
  12-Oct-20 |        337        0.14       75.94
  13-Oct-20 |        337        0.14       76.08
  14-Oct-20 |        337        0.14       76.22
  15-Oct-20 |        337        0.14       76.36
  16-Oct-20 |        337        0.14       76.50
  17-Oct-20 |        337        0.14       76.63
  18-Oct-20 |        337        0.14       76.77
  19-Oct-20 |        337        0.14       76.91
  20-Oct-20 |        337        0.14       77.05
  21-Oct-20 |        337        0.14       77.19
  22-Oct-20 |        337        0.14       77.33
  23-Oct-20 |        337        0.14       77.47
  24-Oct-20 |        337        0.14       77.61
  25-Oct-20 |        337        0.14       77.75
  26-Oct-20 |        337        0.14       77.89
  27-Oct-20 |        337        0.14       78.03
  28-Oct-20 |        337        0.14       78.16
  29-Oct-20 |        337        0.14       78.30
  30-Oct-20 |        337        0.14       78.44
  31-Oct-20 |        337        0.14       78.58
   1-Nov-20 |        337        0.14       78.72
   2-Nov-20 |        337        0.14       78.86
   3-Nov-20 |        337        0.14       79.00
   4-Nov-20 |        337        0.14       79.14
   5-Nov-20 |        337        0.14       79.28
   6-Nov-20 |        337        0.14       79.42
   7-Nov-20 |        337        0.14       79.55
   8-Nov-20 |        337        0.14       79.69
   9-Nov-20 |        337        0.14       79.83
  10-Nov-20 |        337        0.14       79.97
  11-Nov-20 |        337        0.14       80.11
  12-Nov-20 |        337        0.14       80.25
  13-Nov-20 |        337        0.14       80.39
  14-Nov-20 |        337        0.14       80.53
  15-Nov-20 |        337        0.14       80.67
  16-Nov-20 |        337        0.14       80.81
  17-Nov-20 |        337        0.14       80.95
  18-Nov-20 |        337        0.14       81.08
  19-Nov-20 |        337        0.14       81.22
  20-Nov-20 |        337        0.14       81.36
  21-Nov-20 |        337        0.14       81.50
  22-Nov-20 |        337        0.14       81.64
  23-Nov-20 |        337        0.14       81.78
  24-Nov-20 |        337        0.14       81.92
  25-Nov-20 |        337        0.14       82.06
  26-Nov-20 |        337        0.14       82.20
  27-Nov-20 |        337        0.14       82.34
  28-Nov-20 |        337        0.14       82.48
  29-Nov-20 |        337        0.14       82.61
  30-Nov-20 |        337        0.14       82.75
   1-Dec-20 |        337        0.14       82.89
   2-Dec-20 |        337        0.14       83.03
   3-Dec-20 |        337        0.14       83.17
   4-Dec-20 |        337        0.14       83.31
   5-Dec-20 |        337        0.14       83.45
   6-Dec-20 |        337        0.14       83.59
   7-Dec-20 |        337        0.14       83.73
   8-Dec-20 |        337        0.14       83.87
   9-Dec-20 |        337        0.14       84.01
  10-Dec-20 |        337        0.14       84.14
  11-Dec-20 |        337        0.14       84.28
  12-Dec-20 |        337        0.14       84.42
  13-Dec-20 |        337        0.14       84.56
  14-Dec-20 |        337        0.14       84.70
  15-Dec-20 |        337        0.14       84.84
  16-Dec-20 |        337        0.14       84.98
  17-Dec-20 |        337        0.14       85.12
  18-Dec-20 |        337        0.14       85.26
  19-Dec-20 |        337        0.14       85.40
  20-Dec-20 |        337        0.14       85.54
  21-Dec-20 |        337        0.14       85.67
  22-Dec-20 |        337        0.14       85.81
  23-Dec-20 |        337        0.14       85.95
  24-Dec-20 |        337        0.14       86.09
  25-Dec-20 |        337        0.14       86.23
  26-Dec-20 |        337        0.14       86.37
  27-Dec-20 |        337        0.14       86.51
  28-Dec-20 |        337        0.14       86.65
  29-Dec-20 |        337        0.14       86.79
  30-Dec-20 |        337        0.14       86.93
  31-Dec-20 |        337        0.14       87.07
   1-Jan-21 |        337        0.14       87.20
   2-Jan-21 |        337        0.14       87.34
   3-Jan-21 |        337        0.14       87.48
   4-Jan-21 |        337        0.14       87.62
   5-Jan-21 |        337        0.14       87.76
   6-Jan-21 |        337        0.14       87.90
   7-Jan-21 |        337        0.14       88.04
   8-Jan-21 |        337        0.14       88.18
   9-Jan-21 |        337        0.14       88.32
  10-Jan-21 |        337        0.14       88.46
  11-Jan-21 |        337        0.14       88.60
  12-Jan-21 |        337        0.14       88.73
  13-Jan-21 |        337        0.14       88.87
  14-Jan-21 |        337        0.14       89.01
  15-Jan-21 |        337        0.14       89.15
  16-Jan-21 |        337        0.14       89.29
  17-Jan-21 |        337        0.14       89.43
  18-Jan-21 |        337        0.14       89.57
  19-Jan-21 |        337        0.14       89.71
  20-Jan-21 |        337        0.14       89.85
  21-Jan-21 |        337        0.14       89.99
  22-Jan-21 |        337        0.14       90.13
  23-Jan-21 |        337        0.14       90.26
  24-Jan-21 |        337        0.14       90.40
  25-Jan-21 |        337        0.14       90.54
  26-Jan-21 |        337        0.14       90.68
  27-Jan-21 |        337        0.14       90.82
  28-Jan-21 |        337        0.14       90.96
  29-Jan-21 |        337        0.14       91.10
  30-Jan-21 |        337        0.14       91.24
  31-Jan-21 |        337        0.14       91.38
   1-Feb-21 |        337        0.14       91.52
   2-Feb-21 |        337        0.14       91.66
   3-Feb-21 |        337        0.14       91.79
   4-Feb-21 |        337        0.14       91.93
   5-Feb-21 |        337        0.14       92.07
   6-Feb-21 |        337        0.14       92.21
   7-Feb-21 |        337        0.14       92.35
   8-Feb-21 |        337        0.14       92.49
   9-Feb-21 |        337        0.14       92.63
  10-Feb-21 |        337        0.14       92.77
  11-Feb-21 |        337        0.14       92.91
  12-Feb-21 |        337        0.14       93.05
  13-Feb-21 |        337        0.14       93.18
  14-Feb-21 |        337        0.14       93.32
  15-Feb-21 |        337        0.14       93.46
  16-Feb-21 |        337        0.14       93.60
  17-Feb-21 |        337        0.14       93.74
  18-Feb-21 |        337        0.14       93.88
  19-Feb-21 |        337        0.14       94.02
  20-Feb-21 |        337        0.14       94.16
  21-Feb-21 |        337        0.14       94.30
  22-Feb-21 |        337        0.14       94.44
  23-Feb-21 |        337        0.14       94.58
  24-Feb-21 |        337        0.14       94.71
  25-Feb-21 |        337        0.14       94.85
  26-Feb-21 |        337        0.14       94.99
  27-Feb-21 |        337        0.14       95.13
  28-Feb-21 |        337        0.14       95.27
   1-Mar-21 |        337        0.14       95.41
   2-Mar-21 |        337        0.14       95.55
   3-Mar-21 |        337        0.14       95.69
   4-Mar-21 |        337        0.14       95.83
   5-Mar-21 |        337        0.14       95.97
   6-Mar-21 |        337        0.14       96.11
   7-Mar-21 |        337        0.14       96.24
   8-Mar-21 |        337        0.14       96.38
   9-Mar-21 |        337        0.14       96.52
  10-Mar-21 |        337        0.14       96.66
  11-Mar-21 |        337        0.14       96.80
  12-Mar-21 |        337        0.14       96.94
  13-Mar-21 |        337        0.14       97.08
  14-Mar-21 |        337        0.14       97.22
  15-Mar-21 |        337        0.14       97.36
  16-Mar-21 |        337        0.14       97.50
  17-Mar-21 |        337        0.14       97.64
  18-Mar-21 |        337        0.14       97.77
  19-Mar-21 |        337        0.14       97.91
  20-Mar-21 |        337        0.14       98.05
  21-Mar-21 |        337        0.14       98.19
  22-Mar-21 |        337        0.14       98.33
  23-Mar-21 |        337        0.14       98.47
  24-Mar-21 |        337        0.14       98.61
  25-Mar-21 |        337        0.14       98.75
  26-Mar-21 |        337        0.14       98.89
  27-Mar-21 |        337        0.14       99.03
  28-Mar-21 |        337        0.14       99.17
  29-Mar-21 |        337        0.14       99.30
  30-Mar-21 |        337        0.14       99.44
  31-Mar-21 |        337        0.14       99.58
   1-Apr-21 |        337        0.14       99.72
   2-Apr-21 |        337        0.14       99.86
   3-Apr-21 |        337        0.14      100.00
------------+-----------------------------------
      Total |    242,303      100.00

. ** 242,303 Observations. 337 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ** Generate a week variable
. drop week

. gen int week = floor((date-td(31dec2018))/7)+1

. la var week "Week"

. 
. ** Generate a month variable which goes from the 16th of each month to the 15th of the next month. 
. ** This definition of month aligns with the implementation of ETS market in its initial Stages. 
. ** Nick Cox's code:
. drop month16

. gen month16 = date if day(date) == 16
(234,215 missing values generated)

. //      replace month16 = mdy(1, 16, 2019) in 1
. replace month16 = month16[_n-1] if missing(month16)
(234,215 real changes made)

. la var month16 "Month, defined as 16th of this month to 15th of next month"

. gen month16_sif = month16

. format month16 %tddd-Mon-YY

. la var month16_sif "[SIF] Month-year. For convenience."

. order month16_sif, a(month16)

. sort composite_id date

. ** Check days in each month for one device. Looks good.
. *tab month16 if composite_id == "GJSRT100740111"
. 
. ** Generate Dummy for Interregnum period of market
. ** Covid lockdown -- 23 March 2020 to 11 October 2021. 
. ** Mock-III started on 12 October 2021.
. gen D_interregnum_week = week >= 65 & week <= 93

. replace D_interregnum_week =1 if week == 99 | week == 100
(4,718 real changes made)

. la var D_interregnum_week ///
>         "[Week-level] =1 if Interregnum due to Covid-19 lockdown, zero otherwise."

. 
. drop extinct_with_assignment removed_from_sample comment

. 
. ** Remove plants that have no observation from 16-Apr-19 to 03-Apr-21.
. bysort gpcb_id: egen pct_report = mean(!missing(pm_mass_rule0)) if ///
>         month16 >= date("2019jul16", "YMD") & D_interregnum_week == 0
(103,796 missing values generated)

. sort composite_id date

. bysort gpcb_id: egen pct_report_1 = mean(pct_report)

. drop if pct_report_1 == 0
(19,413 observations deleted)

. drop pct_report pct_report_1

. sort composite_id date  

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        310        0.14        0.14
  17-Apr-19 |        310        0.14        0.28
  18-Apr-19 |        310        0.14        0.42
  19-Apr-19 |        310        0.14        0.56
  20-Apr-19 |        310        0.14        0.70
  21-Apr-19 |        310        0.14        0.83
  22-Apr-19 |        310        0.14        0.97
  23-Apr-19 |        310        0.14        1.11
  24-Apr-19 |        310        0.14        1.25
  25-Apr-19 |        310        0.14        1.39
  26-Apr-19 |        310        0.14        1.53
  27-Apr-19 |        310        0.14        1.67
  28-Apr-19 |        310        0.14        1.81
  29-Apr-19 |        310        0.14        1.95
  30-Apr-19 |        310        0.14        2.09
   1-May-19 |        310        0.14        2.23
   2-May-19 |        310        0.14        2.36
   3-May-19 |        310        0.14        2.50
   4-May-19 |        310        0.14        2.64
   5-May-19 |        310        0.14        2.78
   6-May-19 |        310        0.14        2.92
   7-May-19 |        310        0.14        3.06
   8-May-19 |        310        0.14        3.20
   9-May-19 |        310        0.14        3.34
  10-May-19 |        310        0.14        3.48
  11-May-19 |        310        0.14        3.62
  12-May-19 |        310        0.14        3.76
  13-May-19 |        310        0.14        3.89
  14-May-19 |        310        0.14        4.03
  15-May-19 |        310        0.14        4.17
  16-May-19 |        310        0.14        4.31
  17-May-19 |        310        0.14        4.45
  18-May-19 |        310        0.14        4.59
  19-May-19 |        310        0.14        4.73
  20-May-19 |        310        0.14        4.87
  21-May-19 |        310        0.14        5.01
  22-May-19 |        310        0.14        5.15
  23-May-19 |        310        0.14        5.29
  24-May-19 |        310        0.14        5.42
  25-May-19 |        310        0.14        5.56
  26-May-19 |        310        0.14        5.70
  27-May-19 |        310        0.14        5.84
  28-May-19 |        310        0.14        5.98
  29-May-19 |        310        0.14        6.12
  30-May-19 |        310        0.14        6.26
  31-May-19 |        310        0.14        6.40
   1-Jun-19 |        310        0.14        6.54
   2-Jun-19 |        310        0.14        6.68
   3-Jun-19 |        310        0.14        6.82
   4-Jun-19 |        310        0.14        6.95
   5-Jun-19 |        310        0.14        7.09
   6-Jun-19 |        310        0.14        7.23
   7-Jun-19 |        310        0.14        7.37
   8-Jun-19 |        310        0.14        7.51
   9-Jun-19 |        310        0.14        7.65
  10-Jun-19 |        310        0.14        7.79
  11-Jun-19 |        310        0.14        7.93
  12-Jun-19 |        310        0.14        8.07
  13-Jun-19 |        310        0.14        8.21
  14-Jun-19 |        310        0.14        8.34
  15-Jun-19 |        310        0.14        8.48
  16-Jun-19 |        310        0.14        8.62
  17-Jun-19 |        310        0.14        8.76
  18-Jun-19 |        310        0.14        8.90
  19-Jun-19 |        310        0.14        9.04
  20-Jun-19 |        310        0.14        9.18
  21-Jun-19 |        310        0.14        9.32
  22-Jun-19 |        310        0.14        9.46
  23-Jun-19 |        310        0.14        9.60
  24-Jun-19 |        310        0.14        9.74
  25-Jun-19 |        310        0.14        9.87
  26-Jun-19 |        310        0.14       10.01
  27-Jun-19 |        310        0.14       10.15
  28-Jun-19 |        310        0.14       10.29
  29-Jun-19 |        310        0.14       10.43
  30-Jun-19 |        310        0.14       10.57
   1-Jul-19 |        310        0.14       10.71
   2-Jul-19 |        310        0.14       10.85
   3-Jul-19 |        310        0.14       10.99
   4-Jul-19 |        310        0.14       11.13
   5-Jul-19 |        310        0.14       11.27
   6-Jul-19 |        310        0.14       11.40
   7-Jul-19 |        310        0.14       11.54
   8-Jul-19 |        310        0.14       11.68
   9-Jul-19 |        310        0.14       11.82
  10-Jul-19 |        310        0.14       11.96
  11-Jul-19 |        310        0.14       12.10
  12-Jul-19 |        310        0.14       12.24
  13-Jul-19 |        310        0.14       12.38
  14-Jul-19 |        310        0.14       12.52
  15-Jul-19 |        310        0.14       12.66
  16-Jul-19 |        310        0.14       12.80
  17-Jul-19 |        310        0.14       12.93
  18-Jul-19 |        310        0.14       13.07
  19-Jul-19 |        310        0.14       13.21
  20-Jul-19 |        310        0.14       13.35
  21-Jul-19 |        310        0.14       13.49
  22-Jul-19 |        310        0.14       13.63
  23-Jul-19 |        310        0.14       13.77
  24-Jul-19 |        310        0.14       13.91
  25-Jul-19 |        310        0.14       14.05
  26-Jul-19 |        310        0.14       14.19
  27-Jul-19 |        310        0.14       14.33
  28-Jul-19 |        310        0.14       14.46
  29-Jul-19 |        310        0.14       14.60
  30-Jul-19 |        310        0.14       14.74
  31-Jul-19 |        310        0.14       14.88
   1-Aug-19 |        310        0.14       15.02
   2-Aug-19 |        310        0.14       15.16
   3-Aug-19 |        310        0.14       15.30
   4-Aug-19 |        310        0.14       15.44
   5-Aug-19 |        310        0.14       15.58
   6-Aug-19 |        310        0.14       15.72
   7-Aug-19 |        310        0.14       15.86
   8-Aug-19 |        310        0.14       15.99
   9-Aug-19 |        310        0.14       16.13
  10-Aug-19 |        310        0.14       16.27
  11-Aug-19 |        310        0.14       16.41
  12-Aug-19 |        310        0.14       16.55
  13-Aug-19 |        310        0.14       16.69
  14-Aug-19 |        310        0.14       16.83
  15-Aug-19 |        310        0.14       16.97
  16-Aug-19 |        310        0.14       17.11
  17-Aug-19 |        310        0.14       17.25
  18-Aug-19 |        310        0.14       17.39
  19-Aug-19 |        310        0.14       17.52
  20-Aug-19 |        310        0.14       17.66
  21-Aug-19 |        310        0.14       17.80
  22-Aug-19 |        310        0.14       17.94
  23-Aug-19 |        310        0.14       18.08
  24-Aug-19 |        310        0.14       18.22
  25-Aug-19 |        310        0.14       18.36
  26-Aug-19 |        310        0.14       18.50
  27-Aug-19 |        310        0.14       18.64
  28-Aug-19 |        310        0.14       18.78
  29-Aug-19 |        310        0.14       18.92
  30-Aug-19 |        310        0.14       19.05
  31-Aug-19 |        310        0.14       19.19
   1-Sep-19 |        310        0.14       19.33
   2-Sep-19 |        310        0.14       19.47
   3-Sep-19 |        310        0.14       19.61
   4-Sep-19 |        310        0.14       19.75
   5-Sep-19 |        310        0.14       19.89
   6-Sep-19 |        310        0.14       20.03
   7-Sep-19 |        310        0.14       20.17
   8-Sep-19 |        310        0.14       20.31
   9-Sep-19 |        310        0.14       20.45
  10-Sep-19 |        310        0.14       20.58
  11-Sep-19 |        310        0.14       20.72
  12-Sep-19 |        310        0.14       20.86
  13-Sep-19 |        310        0.14       21.00
  14-Sep-19 |        310        0.14       21.14
  15-Sep-19 |        310        0.14       21.28
  16-Sep-19 |        310        0.14       21.42
  17-Sep-19 |        310        0.14       21.56
  18-Sep-19 |        310        0.14       21.70
  19-Sep-19 |        310        0.14       21.84
  20-Sep-19 |        310        0.14       21.97
  21-Sep-19 |        310        0.14       22.11
  22-Sep-19 |        310        0.14       22.25
  23-Sep-19 |        310        0.14       22.39
  24-Sep-19 |        310        0.14       22.53
  25-Sep-19 |        310        0.14       22.67
  26-Sep-19 |        310        0.14       22.81
  27-Sep-19 |        310        0.14       22.95
  28-Sep-19 |        310        0.14       23.09
  29-Sep-19 |        310        0.14       23.23
  30-Sep-19 |        310        0.14       23.37
   1-Oct-19 |        310        0.14       23.50
   2-Oct-19 |        310        0.14       23.64
   3-Oct-19 |        310        0.14       23.78
   4-Oct-19 |        310        0.14       23.92
   5-Oct-19 |        310        0.14       24.06
   6-Oct-19 |        310        0.14       24.20
   7-Oct-19 |        310        0.14       24.34
   8-Oct-19 |        310        0.14       24.48
   9-Oct-19 |        310        0.14       24.62
  10-Oct-19 |        310        0.14       24.76
  11-Oct-19 |        310        0.14       24.90
  12-Oct-19 |        310        0.14       25.03
  13-Oct-19 |        310        0.14       25.17
  14-Oct-19 |        310        0.14       25.31
  15-Oct-19 |        310        0.14       25.45
  16-Oct-19 |        310        0.14       25.59
  17-Oct-19 |        310        0.14       25.73
  18-Oct-19 |        310        0.14       25.87
  19-Oct-19 |        310        0.14       26.01
  20-Oct-19 |        310        0.14       26.15
  21-Oct-19 |        310        0.14       26.29
  22-Oct-19 |        310        0.14       26.43
  23-Oct-19 |        310        0.14       26.56
  24-Oct-19 |        310        0.14       26.70
  25-Oct-19 |        310        0.14       26.84
  26-Oct-19 |        310        0.14       26.98
  27-Oct-19 |        310        0.14       27.12
  28-Oct-19 |        310        0.14       27.26
  29-Oct-19 |        310        0.14       27.40
  30-Oct-19 |        310        0.14       27.54
  31-Oct-19 |        310        0.14       27.68
   1-Nov-19 |        310        0.14       27.82
   2-Nov-19 |        310        0.14       27.96
   3-Nov-19 |        310        0.14       28.09
   4-Nov-19 |        310        0.14       28.23
   5-Nov-19 |        310        0.14       28.37
   6-Nov-19 |        310        0.14       28.51
   7-Nov-19 |        310        0.14       28.65
   8-Nov-19 |        310        0.14       28.79
   9-Nov-19 |        310        0.14       28.93
  10-Nov-19 |        310        0.14       29.07
  11-Nov-19 |        310        0.14       29.21
  12-Nov-19 |        310        0.14       29.35
  13-Nov-19 |        310        0.14       29.49
  14-Nov-19 |        310        0.14       29.62
  15-Nov-19 |        310        0.14       29.76
  16-Nov-19 |        310        0.14       29.90
  17-Nov-19 |        310        0.14       30.04
  18-Nov-19 |        310        0.14       30.18
  19-Nov-19 |        310        0.14       30.32
  20-Nov-19 |        310        0.14       30.46
  21-Nov-19 |        310        0.14       30.60
  22-Nov-19 |        310        0.14       30.74
  23-Nov-19 |        310        0.14       30.88
  24-Nov-19 |        310        0.14       31.02
  25-Nov-19 |        310        0.14       31.15
  26-Nov-19 |        310        0.14       31.29
  27-Nov-19 |        310        0.14       31.43
  28-Nov-19 |        310        0.14       31.57
  29-Nov-19 |        310        0.14       31.71
  30-Nov-19 |        310        0.14       31.85
   1-Dec-19 |        310        0.14       31.99
   2-Dec-19 |        310        0.14       32.13
   3-Dec-19 |        310        0.14       32.27
   4-Dec-19 |        310        0.14       32.41
   5-Dec-19 |        310        0.14       32.55
   6-Dec-19 |        310        0.14       32.68
   7-Dec-19 |        310        0.14       32.82
   8-Dec-19 |        310        0.14       32.96
   9-Dec-19 |        310        0.14       33.10
  10-Dec-19 |        310        0.14       33.24
  11-Dec-19 |        310        0.14       33.38
  12-Dec-19 |        310        0.14       33.52
  13-Dec-19 |        310        0.14       33.66
  14-Dec-19 |        310        0.14       33.80
  15-Dec-19 |        310        0.14       33.94
  16-Dec-19 |        310        0.14       34.08
  17-Dec-19 |        310        0.14       34.21
  18-Dec-19 |        310        0.14       34.35
  19-Dec-19 |        310        0.14       34.49
  20-Dec-19 |        310        0.14       34.63
  21-Dec-19 |        310        0.14       34.77
  22-Dec-19 |        310        0.14       34.91
  23-Dec-19 |        310        0.14       35.05
  24-Dec-19 |        310        0.14       35.19
  25-Dec-19 |        310        0.14       35.33
  26-Dec-19 |        310        0.14       35.47
  27-Dec-19 |        310        0.14       35.61
  28-Dec-19 |        310        0.14       35.74
  29-Dec-19 |        310        0.14       35.88
  30-Dec-19 |        310        0.14       36.02
  31-Dec-19 |        310        0.14       36.16
   1-Jan-20 |        310        0.14       36.30
   2-Jan-20 |        310        0.14       36.44
   3-Jan-20 |        310        0.14       36.58
   4-Jan-20 |        310        0.14       36.72
   5-Jan-20 |        310        0.14       36.86
   6-Jan-20 |        310        0.14       37.00
   7-Jan-20 |        310        0.14       37.13
   8-Jan-20 |        310        0.14       37.27
   9-Jan-20 |        310        0.14       37.41
  10-Jan-20 |        310        0.14       37.55
  11-Jan-20 |        310        0.14       37.69
  12-Jan-20 |        310        0.14       37.83
  13-Jan-20 |        310        0.14       37.97
  14-Jan-20 |        310        0.14       38.11
  15-Jan-20 |        310        0.14       38.25
  16-Jan-20 |        310        0.14       38.39
  17-Jan-20 |        310        0.14       38.53
  18-Jan-20 |        310        0.14       38.66
  19-Jan-20 |        310        0.14       38.80
  20-Jan-20 |        310        0.14       38.94
  21-Jan-20 |        310        0.14       39.08
  22-Jan-20 |        310        0.14       39.22
  23-Jan-20 |        310        0.14       39.36
  24-Jan-20 |        310        0.14       39.50
  25-Jan-20 |        310        0.14       39.64
  26-Jan-20 |        310        0.14       39.78
  27-Jan-20 |        310        0.14       39.92
  28-Jan-20 |        310        0.14       40.06
  29-Jan-20 |        310        0.14       40.19
  30-Jan-20 |        310        0.14       40.33
  31-Jan-20 |        310        0.14       40.47
   1-Feb-20 |        310        0.14       40.61
   2-Feb-20 |        310        0.14       40.75
   3-Feb-20 |        310        0.14       40.89
   4-Feb-20 |        310        0.14       41.03
   5-Feb-20 |        310        0.14       41.17
   6-Feb-20 |        310        0.14       41.31
   7-Feb-20 |        310        0.14       41.45
   8-Feb-20 |        310        0.14       41.59
   9-Feb-20 |        310        0.14       41.72
  10-Feb-20 |        310        0.14       41.86
  11-Feb-20 |        310        0.14       42.00
  12-Feb-20 |        310        0.14       42.14
  13-Feb-20 |        310        0.14       42.28
  14-Feb-20 |        310        0.14       42.42
  15-Feb-20 |        310        0.14       42.56
  16-Feb-20 |        310        0.14       42.70
  17-Feb-20 |        310        0.14       42.84
  18-Feb-20 |        310        0.14       42.98
  19-Feb-20 |        310        0.14       43.12
  20-Feb-20 |        310        0.14       43.25
  21-Feb-20 |        310        0.14       43.39
  22-Feb-20 |        310        0.14       43.53
  23-Feb-20 |        310        0.14       43.67
  24-Feb-20 |        310        0.14       43.81
  25-Feb-20 |        310        0.14       43.95
  26-Feb-20 |        310        0.14       44.09
  27-Feb-20 |        310        0.14       44.23
  28-Feb-20 |        310        0.14       44.37
  29-Feb-20 |        310        0.14       44.51
   1-Mar-20 |        310        0.14       44.65
   2-Mar-20 |        310        0.14       44.78
   3-Mar-20 |        310        0.14       44.92
   4-Mar-20 |        310        0.14       45.06
   5-Mar-20 |        310        0.14       45.20
   6-Mar-20 |        310        0.14       45.34
   7-Mar-20 |        310        0.14       45.48
   8-Mar-20 |        310        0.14       45.62
   9-Mar-20 |        310        0.14       45.76
  10-Mar-20 |        310        0.14       45.90
  11-Mar-20 |        310        0.14       46.04
  12-Mar-20 |        310        0.14       46.18
  13-Mar-20 |        310        0.14       46.31
  14-Mar-20 |        310        0.14       46.45
  15-Mar-20 |        310        0.14       46.59
  16-Mar-20 |        310        0.14       46.73
  17-Mar-20 |        310        0.14       46.87
  18-Mar-20 |        310        0.14       47.01
  19-Mar-20 |        310        0.14       47.15
  20-Mar-20 |        310        0.14       47.29
  21-Mar-20 |        310        0.14       47.43
  22-Mar-20 |        310        0.14       47.57
  23-Mar-20 |        310        0.14       47.71
  24-Mar-20 |        310        0.14       47.84
  25-Mar-20 |        310        0.14       47.98
  26-Mar-20 |        310        0.14       48.12
  27-Mar-20 |        310        0.14       48.26
  28-Mar-20 |        310        0.14       48.40
  29-Mar-20 |        310        0.14       48.54
  30-Mar-20 |        310        0.14       48.68
  31-Mar-20 |        310        0.14       48.82
   1-Apr-20 |        310        0.14       48.96
   2-Apr-20 |        310        0.14       49.10
   3-Apr-20 |        310        0.14       49.24
   4-Apr-20 |        310        0.14       49.37
   5-Apr-20 |        310        0.14       49.51
   6-Apr-20 |        310        0.14       49.65
   7-Apr-20 |        310        0.14       49.79
   8-Apr-20 |        310        0.14       49.93
   9-Apr-20 |        310        0.14       50.07
  10-Apr-20 |        310        0.14       50.21
  11-Apr-20 |        310        0.14       50.35
  12-Apr-20 |        310        0.14       50.49
  13-Apr-20 |        310        0.14       50.63
  14-Apr-20 |        310        0.14       50.76
  15-Apr-20 |        310        0.14       50.90
  16-Apr-20 |        310        0.14       51.04
  17-Apr-20 |        310        0.14       51.18
  18-Apr-20 |        310        0.14       51.32
  19-Apr-20 |        310        0.14       51.46
  20-Apr-20 |        310        0.14       51.60
  21-Apr-20 |        310        0.14       51.74
  22-Apr-20 |        310        0.14       51.88
  23-Apr-20 |        310        0.14       52.02
  24-Apr-20 |        310        0.14       52.16
  25-Apr-20 |        310        0.14       52.29
  26-Apr-20 |        310        0.14       52.43
  27-Apr-20 |        310        0.14       52.57
  28-Apr-20 |        310        0.14       52.71
  29-Apr-20 |        310        0.14       52.85
  30-Apr-20 |        310        0.14       52.99
   1-May-20 |        310        0.14       53.13
   2-May-20 |        310        0.14       53.27
   3-May-20 |        310        0.14       53.41
   4-May-20 |        310        0.14       53.55
   5-May-20 |        310        0.14       53.69
   6-May-20 |        310        0.14       53.82
   7-May-20 |        310        0.14       53.96
   8-May-20 |        310        0.14       54.10
   9-May-20 |        310        0.14       54.24
  10-May-20 |        310        0.14       54.38
  11-May-20 |        310        0.14       54.52
  12-May-20 |        310        0.14       54.66
  13-May-20 |        310        0.14       54.80
  14-May-20 |        310        0.14       54.94
  15-May-20 |        310        0.14       55.08
  16-May-20 |        310        0.14       55.22
  17-May-20 |        310        0.14       55.35
  18-May-20 |        310        0.14       55.49
  19-May-20 |        310        0.14       55.63
  20-May-20 |        310        0.14       55.77
  21-May-20 |        310        0.14       55.91
  22-May-20 |        310        0.14       56.05
  23-May-20 |        310        0.14       56.19
  24-May-20 |        310        0.14       56.33
  25-May-20 |        310        0.14       56.47
  26-May-20 |        310        0.14       56.61
  27-May-20 |        310        0.14       56.75
  28-May-20 |        310        0.14       56.88
  29-May-20 |        310        0.14       57.02
  30-May-20 |        310        0.14       57.16
  31-May-20 |        310        0.14       57.30
   1-Jun-20 |        310        0.14       57.44
   2-Jun-20 |        310        0.14       57.58
   3-Jun-20 |        310        0.14       57.72
   4-Jun-20 |        310        0.14       57.86
   5-Jun-20 |        310        0.14       58.00
   6-Jun-20 |        310        0.14       58.14
   7-Jun-20 |        310        0.14       58.28
   8-Jun-20 |        310        0.14       58.41
   9-Jun-20 |        310        0.14       58.55
  10-Jun-20 |        310        0.14       58.69
  11-Jun-20 |        310        0.14       58.83
  12-Jun-20 |        310        0.14       58.97
  13-Jun-20 |        310        0.14       59.11
  14-Jun-20 |        310        0.14       59.25
  15-Jun-20 |        310        0.14       59.39
  16-Jun-20 |        310        0.14       59.53
  17-Jun-20 |        310        0.14       59.67
  18-Jun-20 |        310        0.14       59.81
  19-Jun-20 |        310        0.14       59.94
  20-Jun-20 |        310        0.14       60.08
  21-Jun-20 |        310        0.14       60.22
  22-Jun-20 |        310        0.14       60.36
  23-Jun-20 |        310        0.14       60.50
  24-Jun-20 |        310        0.14       60.64
  25-Jun-20 |        310        0.14       60.78
  26-Jun-20 |        310        0.14       60.92
  27-Jun-20 |        310        0.14       61.06
  28-Jun-20 |        310        0.14       61.20
  29-Jun-20 |        310        0.14       61.34
  30-Jun-20 |        310        0.14       61.47
   1-Jul-20 |        310        0.14       61.61
   2-Jul-20 |        310        0.14       61.75
   3-Jul-20 |        310        0.14       61.89
   4-Jul-20 |        310        0.14       62.03
   5-Jul-20 |        310        0.14       62.17
   6-Jul-20 |        310        0.14       62.31
   7-Jul-20 |        310        0.14       62.45
   8-Jul-20 |        310        0.14       62.59
   9-Jul-20 |        310        0.14       62.73
  10-Jul-20 |        310        0.14       62.87
  11-Jul-20 |        310        0.14       63.00
  12-Jul-20 |        310        0.14       63.14
  13-Jul-20 |        310        0.14       63.28
  14-Jul-20 |        310        0.14       63.42
  15-Jul-20 |        310        0.14       63.56
  16-Jul-20 |        310        0.14       63.70
  17-Jul-20 |        310        0.14       63.84
  18-Jul-20 |        310        0.14       63.98
  19-Jul-20 |        310        0.14       64.12
  20-Jul-20 |        310        0.14       64.26
  21-Jul-20 |        310        0.14       64.39
  22-Jul-20 |        310        0.14       64.53
  23-Jul-20 |        310        0.14       64.67
  24-Jul-20 |        310        0.14       64.81
  25-Jul-20 |        310        0.14       64.95
  26-Jul-20 |        310        0.14       65.09
  27-Jul-20 |        310        0.14       65.23
  28-Jul-20 |        310        0.14       65.37
  29-Jul-20 |        310        0.14       65.51
  30-Jul-20 |        310        0.14       65.65
  31-Jul-20 |        310        0.14       65.79
   1-Aug-20 |        310        0.14       65.92
   2-Aug-20 |        310        0.14       66.06
   3-Aug-20 |        310        0.14       66.20
   4-Aug-20 |        310        0.14       66.34
   5-Aug-20 |        310        0.14       66.48
   6-Aug-20 |        310        0.14       66.62
   7-Aug-20 |        310        0.14       66.76
   8-Aug-20 |        310        0.14       66.90
   9-Aug-20 |        310        0.14       67.04
  10-Aug-20 |        310        0.14       67.18
  11-Aug-20 |        310        0.14       67.32
  12-Aug-20 |        310        0.14       67.45
  13-Aug-20 |        310        0.14       67.59
  14-Aug-20 |        310        0.14       67.73
  15-Aug-20 |        310        0.14       67.87
  16-Aug-20 |        310        0.14       68.01
  17-Aug-20 |        310        0.14       68.15
  18-Aug-20 |        310        0.14       68.29
  19-Aug-20 |        310        0.14       68.43
  20-Aug-20 |        310        0.14       68.57
  21-Aug-20 |        310        0.14       68.71
  22-Aug-20 |        310        0.14       68.85
  23-Aug-20 |        310        0.14       68.98
  24-Aug-20 |        310        0.14       69.12
  25-Aug-20 |        310        0.14       69.26
  26-Aug-20 |        310        0.14       69.40
  27-Aug-20 |        310        0.14       69.54
  28-Aug-20 |        310        0.14       69.68
  29-Aug-20 |        310        0.14       69.82
  30-Aug-20 |        310        0.14       69.96
  31-Aug-20 |        310        0.14       70.10
   1-Sep-20 |        310        0.14       70.24
   2-Sep-20 |        310        0.14       70.38
   3-Sep-20 |        310        0.14       70.51
   4-Sep-20 |        310        0.14       70.65
   5-Sep-20 |        310        0.14       70.79
   6-Sep-20 |        310        0.14       70.93
   7-Sep-20 |        310        0.14       71.07
   8-Sep-20 |        310        0.14       71.21
   9-Sep-20 |        310        0.14       71.35
  10-Sep-20 |        310        0.14       71.49
  11-Sep-20 |        310        0.14       71.63
  12-Sep-20 |        310        0.14       71.77
  13-Sep-20 |        310        0.14       71.91
  14-Sep-20 |        310        0.14       72.04
  15-Sep-20 |        310        0.14       72.18
  16-Sep-20 |        310        0.14       72.32
  17-Sep-20 |        310        0.14       72.46
  18-Sep-20 |        310        0.14       72.60
  19-Sep-20 |        310        0.14       72.74
  20-Sep-20 |        310        0.14       72.88
  21-Sep-20 |        310        0.14       73.02
  22-Sep-20 |        310        0.14       73.16
  23-Sep-20 |        310        0.14       73.30
  24-Sep-20 |        310        0.14       73.44
  25-Sep-20 |        310        0.14       73.57
  26-Sep-20 |        310        0.14       73.71
  27-Sep-20 |        310        0.14       73.85
  28-Sep-20 |        310        0.14       73.99
  29-Sep-20 |        310        0.14       74.13
  30-Sep-20 |        310        0.14       74.27
   1-Oct-20 |        310        0.14       74.41
   2-Oct-20 |        310        0.14       74.55
   3-Oct-20 |        310        0.14       74.69
   4-Oct-20 |        310        0.14       74.83
   5-Oct-20 |        310        0.14       74.97
   6-Oct-20 |        310        0.14       75.10
   7-Oct-20 |        310        0.14       75.24
   8-Oct-20 |        310        0.14       75.38
   9-Oct-20 |        310        0.14       75.52
  10-Oct-20 |        310        0.14       75.66
  11-Oct-20 |        310        0.14       75.80
  12-Oct-20 |        310        0.14       75.94
  13-Oct-20 |        310        0.14       76.08
  14-Oct-20 |        310        0.14       76.22
  15-Oct-20 |        310        0.14       76.36
  16-Oct-20 |        310        0.14       76.50
  17-Oct-20 |        310        0.14       76.63
  18-Oct-20 |        310        0.14       76.77
  19-Oct-20 |        310        0.14       76.91
  20-Oct-20 |        310        0.14       77.05
  21-Oct-20 |        310        0.14       77.19
  22-Oct-20 |        310        0.14       77.33
  23-Oct-20 |        310        0.14       77.47
  24-Oct-20 |        310        0.14       77.61
  25-Oct-20 |        310        0.14       77.75
  26-Oct-20 |        310        0.14       77.89
  27-Oct-20 |        310        0.14       78.03
  28-Oct-20 |        310        0.14       78.16
  29-Oct-20 |        310        0.14       78.30
  30-Oct-20 |        310        0.14       78.44
  31-Oct-20 |        310        0.14       78.58
   1-Nov-20 |        310        0.14       78.72
   2-Nov-20 |        310        0.14       78.86
   3-Nov-20 |        310        0.14       79.00
   4-Nov-20 |        310        0.14       79.14
   5-Nov-20 |        310        0.14       79.28
   6-Nov-20 |        310        0.14       79.42
   7-Nov-20 |        310        0.14       79.55
   8-Nov-20 |        310        0.14       79.69
   9-Nov-20 |        310        0.14       79.83
  10-Nov-20 |        310        0.14       79.97
  11-Nov-20 |        310        0.14       80.11
  12-Nov-20 |        310        0.14       80.25
  13-Nov-20 |        310        0.14       80.39
  14-Nov-20 |        310        0.14       80.53
  15-Nov-20 |        310        0.14       80.67
  16-Nov-20 |        310        0.14       80.81
  17-Nov-20 |        310        0.14       80.95
  18-Nov-20 |        310        0.14       81.08
  19-Nov-20 |        310        0.14       81.22
  20-Nov-20 |        310        0.14       81.36
  21-Nov-20 |        310        0.14       81.50
  22-Nov-20 |        310        0.14       81.64
  23-Nov-20 |        310        0.14       81.78
  24-Nov-20 |        310        0.14       81.92
  25-Nov-20 |        310        0.14       82.06
  26-Nov-20 |        310        0.14       82.20
  27-Nov-20 |        310        0.14       82.34
  28-Nov-20 |        310        0.14       82.48
  29-Nov-20 |        310        0.14       82.61
  30-Nov-20 |        310        0.14       82.75
   1-Dec-20 |        310        0.14       82.89
   2-Dec-20 |        310        0.14       83.03
   3-Dec-20 |        310        0.14       83.17
   4-Dec-20 |        310        0.14       83.31
   5-Dec-20 |        310        0.14       83.45
   6-Dec-20 |        310        0.14       83.59
   7-Dec-20 |        310        0.14       83.73
   8-Dec-20 |        310        0.14       83.87
   9-Dec-20 |        310        0.14       84.01
  10-Dec-20 |        310        0.14       84.14
  11-Dec-20 |        310        0.14       84.28
  12-Dec-20 |        310        0.14       84.42
  13-Dec-20 |        310        0.14       84.56
  14-Dec-20 |        310        0.14       84.70
  15-Dec-20 |        310        0.14       84.84
  16-Dec-20 |        310        0.14       84.98
  17-Dec-20 |        310        0.14       85.12
  18-Dec-20 |        310        0.14       85.26
  19-Dec-20 |        310        0.14       85.40
  20-Dec-20 |        310        0.14       85.54
  21-Dec-20 |        310        0.14       85.67
  22-Dec-20 |        310        0.14       85.81
  23-Dec-20 |        310        0.14       85.95
  24-Dec-20 |        310        0.14       86.09
  25-Dec-20 |        310        0.14       86.23
  26-Dec-20 |        310        0.14       86.37
  27-Dec-20 |        310        0.14       86.51
  28-Dec-20 |        310        0.14       86.65
  29-Dec-20 |        310        0.14       86.79
  30-Dec-20 |        310        0.14       86.93
  31-Dec-20 |        310        0.14       87.07
   1-Jan-21 |        310        0.14       87.20
   2-Jan-21 |        310        0.14       87.34
   3-Jan-21 |        310        0.14       87.48
   4-Jan-21 |        310        0.14       87.62
   5-Jan-21 |        310        0.14       87.76
   6-Jan-21 |        310        0.14       87.90
   7-Jan-21 |        310        0.14       88.04
   8-Jan-21 |        310        0.14       88.18
   9-Jan-21 |        310        0.14       88.32
  10-Jan-21 |        310        0.14       88.46
  11-Jan-21 |        310        0.14       88.60
  12-Jan-21 |        310        0.14       88.73
  13-Jan-21 |        310        0.14       88.87
  14-Jan-21 |        310        0.14       89.01
  15-Jan-21 |        310        0.14       89.15
  16-Jan-21 |        310        0.14       89.29
  17-Jan-21 |        310        0.14       89.43
  18-Jan-21 |        310        0.14       89.57
  19-Jan-21 |        310        0.14       89.71
  20-Jan-21 |        310        0.14       89.85
  21-Jan-21 |        310        0.14       89.99
  22-Jan-21 |        310        0.14       90.13
  23-Jan-21 |        310        0.14       90.26
  24-Jan-21 |        310        0.14       90.40
  25-Jan-21 |        310        0.14       90.54
  26-Jan-21 |        310        0.14       90.68
  27-Jan-21 |        310        0.14       90.82
  28-Jan-21 |        310        0.14       90.96
  29-Jan-21 |        310        0.14       91.10
  30-Jan-21 |        310        0.14       91.24
  31-Jan-21 |        310        0.14       91.38
   1-Feb-21 |        310        0.14       91.52
   2-Feb-21 |        310        0.14       91.66
   3-Feb-21 |        310        0.14       91.79
   4-Feb-21 |        310        0.14       91.93
   5-Feb-21 |        310        0.14       92.07
   6-Feb-21 |        310        0.14       92.21
   7-Feb-21 |        310        0.14       92.35
   8-Feb-21 |        310        0.14       92.49
   9-Feb-21 |        310        0.14       92.63
  10-Feb-21 |        310        0.14       92.77
  11-Feb-21 |        310        0.14       92.91
  12-Feb-21 |        310        0.14       93.05
  13-Feb-21 |        310        0.14       93.18
  14-Feb-21 |        310        0.14       93.32
  15-Feb-21 |        310        0.14       93.46
  16-Feb-21 |        310        0.14       93.60
  17-Feb-21 |        310        0.14       93.74
  18-Feb-21 |        310        0.14       93.88
  19-Feb-21 |        310        0.14       94.02
  20-Feb-21 |        310        0.14       94.16
  21-Feb-21 |        310        0.14       94.30
  22-Feb-21 |        310        0.14       94.44
  23-Feb-21 |        310        0.14       94.58
  24-Feb-21 |        310        0.14       94.71
  25-Feb-21 |        310        0.14       94.85
  26-Feb-21 |        310        0.14       94.99
  27-Feb-21 |        310        0.14       95.13
  28-Feb-21 |        310        0.14       95.27
   1-Mar-21 |        310        0.14       95.41
   2-Mar-21 |        310        0.14       95.55
   3-Mar-21 |        310        0.14       95.69
   4-Mar-21 |        310        0.14       95.83
   5-Mar-21 |        310        0.14       95.97
   6-Mar-21 |        310        0.14       96.11
   7-Mar-21 |        310        0.14       96.24
   8-Mar-21 |        310        0.14       96.38
   9-Mar-21 |        310        0.14       96.52
  10-Mar-21 |        310        0.14       96.66
  11-Mar-21 |        310        0.14       96.80
  12-Mar-21 |        310        0.14       96.94
  13-Mar-21 |        310        0.14       97.08
  14-Mar-21 |        310        0.14       97.22
  15-Mar-21 |        310        0.14       97.36
  16-Mar-21 |        310        0.14       97.50
  17-Mar-21 |        310        0.14       97.64
  18-Mar-21 |        310        0.14       97.77
  19-Mar-21 |        310        0.14       97.91
  20-Mar-21 |        310        0.14       98.05
  21-Mar-21 |        310        0.14       98.19
  22-Mar-21 |        310        0.14       98.33
  23-Mar-21 |        310        0.14       98.47
  24-Mar-21 |        310        0.14       98.61
  25-Mar-21 |        310        0.14       98.75
  26-Mar-21 |        310        0.14       98.89
  27-Mar-21 |        310        0.14       99.03
  28-Mar-21 |        310        0.14       99.17
  29-Mar-21 |        310        0.14       99.30
  30-Mar-21 |        310        0.14       99.44
  31-Mar-21 |        310        0.14       99.58
   1-Apr-21 |        310        0.14       99.72
   2-Apr-21 |        310        0.14       99.86
   3-Apr-21 |        310        0.14      100.00
------------+-----------------------------------
      Total |    222,890      100.00

. ** 222,890 Observations. 310 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ********************************************************************************
. ********************* [1] CALCULATE ACTUAL STACK DAY MASS **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Replace tot_report_hrs to zero 
.         ** if the stack was not sending a valid caliberated stack-day kg/hr that day
.         gen tot_report_hrs_rule`i' = tot_report_hrs
  3.         replace tot_report_hrs_rule`i' = 0 if D_vctransmitting_rule`i' == 0
  4.         label var tot_report_hrs_rule`i' ///
>                 "[RE-LABELED] Stack-day VALID CALIBRATED Reporting Hours from CEMS - rule `i'"
  5. 
.         ** Calculate DAILY actual mass emissions using CEMA Day Reporting Hours
.         gen stack_daily_mass_actual_rule`i' = pm_mass_rule`i' * tot_report_hrs_rule`i'
  6.         la var stack_daily_mass_actual_rule`i' ///
>                 "Stack Day Actual Mass Emissions (kg) from CEMS Reported Hours - rule `i'"
  7. 
. }
(13,811 real changes made)
(92,469 missing values generated)
(13,152 real changes made)
(91,810 missing values generated)
(51,885 real changes made)
(130,543 missing values generated)
(51,410 real changes made)
(130,068 missing values generated)
(72,276 real changes made)
(150,934 missing values generated)
(71,909 real changes made)
(150,567 missing values generated)
(61,133 real changes made)
(139,791 missing values generated)
(60,702 real changes made)
(139,360 missing values generated)
(30,334 real changes made)
(108,992 missing values generated)
(29,748 real changes made)
(108,406 missing values generated)

. 
. ********************************************************************************
. ***************** [2] DAILY NON-REPORTING HOURS FOR IMPUTATION *****************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate DAILY non-reporting hours for imputation
.         gen daily_nonreport_hrs_rule`i' = 24 - tot_report_hrs_rule`i'
  3.         order daily_nonreport_hrs_rule`i', a(tot_report_hrs_rule`i')
  4.         la var daily_nonreport_hrs_rule`i' ///
>                 "Stack Day NON-Reporting Hours - CEMS - rule `i'"
  5. 
. }

. 
. ********************************************************************************
. ********* [3] For Imp: GENERATE STACK'S OWN WEEK and MONTH MEAN KG/HR **********
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate stack's own week mean kg/hr for missing pm mass values
.         bysort composite_id week: egen week_mean_mass_rule`i' = mean(pm_mass_rule`i')
  3.         label var week_mean_mass_rule`i' "Stack Week Mean kg/hr - rule `i'"
  4. 
. //      ** Calculate stack's own month mean kg/hr for stacks missing entire week of pm mass
. //      bysort composite_id month16: egen month_mean_mass_rule`i' = mean(pm_mass_rule`i')
. //      label var month_mean_mass_rule`i' "Stack Month Mean kg/hr - rule `i'"
. 
. }
(77,721 missing values generated)
(77,182 missing values generated)
(119,617 missing values generated)
(119,246 missing values generated)
(141,866 missing values generated)
(141,642 missing values generated)
(129,965 missing values generated)
(129,650 missing values generated)
(96,226 missing values generated)
(95,778 missing values generated)

. 
. /*******************************************************************************
>            NOW READY FOR IMPUTATION RULE 0a.
>            THE IMPLEMENTATION OF THIS RULE WILL BE:
> 
>            1)   IMPUTE STACK'S OWN WEEK MEAN PM_MASS (KG/HR) FOR ALL MISSING VALUES
>            OF STACK DAY PM_MASS (KG/HR). 
>            2)   IF WEEK MEAN KG/HR IS MISSING, IMPUTE MONTH MEAN PM_MASS (KG/HR)
>            3)   THE FINAL EMISSION QUANTITY IS:
> 
>            VALIDATED STACK MASS (KG) = 
>            ACTUAL STACK MASS (KG) USING CEMS REPORTED HOURS +
>            IMPUTED STACK MASS (KG) USING CEMS NON-REPORTED HOURS
>    ****************************************************************************/
. 
. 
. 
. ********************************************************************************
. ******************** [4] CALCULATE DAILY STACK IMPUTED MASS ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate PER DAY imputed emissions
.         gen stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * week_mean_mass_rule`i'
  3. //      replace stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * month_mean_mass_rule`i' ///
. //              if week_mean_mass_rule`i' == .
.         la var stack_daily_mass_imp_rule`i' ///
>                 "Stack-day Imputed Mass Emissions (kg) from CEMS Non-Reported Hours - rule`i'"
  4. 
.         ** Correct for week of Diwali 2019 when imputation should be zero.
.         replace stack_daily_mass_imp_rule`i' = 0 if ///
>                 date >= date("2019oct26", "YMD") & ///
>                 date <= date("2019nov03", "YMD") & ///
>                 stack_daily_mass_imp_rule`i' != .
  5. 
. }
(77,721 missing values generated)
(929 real changes made)
(77,182 missing values generated)
(940 real changes made)
(119,617 missing values generated)
(625 real changes made)
(119,246 missing values generated)
(627 real changes made)
(141,866 missing values generated)
(513 real changes made)
(141,642 missing values generated)
(515 real changes made)
(129,965 missing values generated)
(570 real changes made)
(129,650 missing values generated)
(572 real changes made)
(96,226 missing values generated)
(807 real changes made)
(95,778 missing values generated)
(812 real changes made)

. 
. ********************************************************************************
. ******************* [5] CALCULATE DAILY STACK VALIDATED MASS *******************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate validated DAY emissions per stack
.         gen stack_daily_mass_val_rule`i' = stack_daily_mass_actual_rule`i' + stack_daily_mass_imp_rule`i'
  3.         replace stack_daily_mass_val_rule`i' = stack_daily_mass_imp_rule`i' ///
>                 if stack_daily_mass_val_rule`i' == .
  4.         la var stack_daily_mass_val_rule`i' ///
>                 "Stack Day Validated Mass Emissions (kg) (=Stack-day Actual + Stack-day Imp) - rule `i'"
  5. 
. }
(92,469 missing values generated)
(14,748 real changes made)
note: label truncated to 80 characters
(91,810 missing values generated)
(14,628 real changes made)
note: label truncated to 80 characters
(130,543 missing values generated)
(10,926 real changes made)
note: label truncated to 80 characters
(130,068 missing values generated)
(10,822 real changes made)
note: label truncated to 80 characters
(150,934 missing values generated)
(9,068 real changes made)
note: label truncated to 80 characters
(150,567 missing values generated)
(8,925 real changes made)
note: label truncated to 80 characters
(139,791 missing values generated)
(9,826 real changes made)
note: label truncated to 80 characters
(139,360 missing values generated)
(9,710 real changes made)
note: label truncated to 80 characters
(108,992 missing values generated)
(12,766 real changes made)
note: label truncated to 80 characters
(108,406 missing values generated)
(12,628 real changes made)
note: label truncated to 80 characters

. 
. /*******************************************************************************
>            NOW READY TO MAKE THE DEPENDENT VARIABLE FOR REGRESSIONS IN PART 6 
>            (6. TREATMENT EFFECT ANALYSIS). THIS VAR IS PLANT MONTH MASS (KG).
> 
>            STEPS TO CREATE THIS VARIABLE WILL BE:
> 
>            6.1) CALCULATE STACK WEEK MASS (KG), AND THEN PLANT WEEK MASS (KG).
>            FIRST GENERATE THESE VARIABLES IN THE STACK-DAY LEVEL DATA SET.
>            AND SAVE IT FOR FUTURE USE IF NEEDED ("_StackDayLevel.dta").
> 
>            6.2) THEN, COLLAPSE THE STACK-DAY LEVEL DATA SET TO KEEP ONE DATA POINT 
>            PER PLANT PER WEEK ("_PlantWeekLevel.dta"). 
> 
>            CONTAINS THE DEPENDENT VARIABLE: PLANT-WEEK MASS (KG) EMISSIONS 
>            USING IMPUTATION RULE 0a.
>    ****************************************************************************/
. 
. preserve

. 
. ********************************************************************************
. ********************* [6.1] GENERATE STACK-MONTH MASS (KG) *********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER STACK
.         bysort composite_id month16: egen stack_month_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id month16: egen miss_stack_month_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_month_mass_val_rule`i' = . if miss_stack_month_mass_val == 1
  5.         la var stack_month_mass_val_rule`i' ///
>                 "Stack-month Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_stack_month_mass_val
  7. 
. }
(106,191 real changes made, 106,191 to missing)
(105,380 real changes made, 105,380 to missing)
(138,950 real changes made, 138,950 to missing)
(138,320 real changes made, 138,320 to missing)
(157,310 real changes made, 157,310 to missing)
(156,819 real changes made, 156,819 to missing)
(147,270 real changes made, 147,270 to missing)
(146,579 real changes made, 146,579 to missing)
(120,001 real changes made, 120,001 to missing)
(119,279 real changes made, 119,279 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id month16: gen dump=_n

. bysort composite_id month16: keep if _n==_N     
(215,450 observations deleted)

. keep composite_id industry_id gpcb_id month16 treatmentstatus stack_month_mass_val* 

. ** 7,440 observations. 310 stacks. 24 months from April 2019 to March 2021.
. 
. ********************************************************************************
. ******************** [6.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. /**     AS PER NICK'S INSTRUCTION ON WEEKLY CALL 01 DEC 2020: FOR PLANTS WITH >1 STACK, 
>            WE WILL ONLY CALCULATE THEIR PLANT MASS (KG) SUM IF ALL STACKS ARE CONNECTED. 
>            IF STACKS ARE PARTIALLY CONNECTED (i.e., ONLY 1 OF 3 STACKS CONNECTED), 
>    THE ENTIRE PLANT SUM WILL BE MISSING.        **/
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER PLANT
.         bysort gpcb_id month16: egen ind_month_mass_val_rule`i' = sum(stack_month_mass_val_rule`i')
  3.         bysort gpcb_id month16: egen miss_ind_month_mass_val = max(missing(stack_month_mass_val_rule`i'))
  4.         replace ind_month_mass_val_rule`i' = . if miss_ind_month_mass_val == 1
  5.         la var stack_month_mass_val_rule`i' ///
>                 "Plant-month Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_month_mass_val
  7. 
. }
(3,603 real changes made, 3,603 to missing)
(3,579 real changes made, 3,579 to missing)
(4,680 real changes made, 4,680 to missing)
(4,662 real changes made, 4,662 to missing)
(5,303 real changes made, 5,303 to missing)
(5,289 real changes made, 5,289 to missing)
(4,951 real changes made, 4,951 to missing)
(4,930 real changes made, 4,930 to missing)
(4,058 real changes made, 4,058 to missing)
(4,037 real changes made, 4,037 to missing)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id month16: gen dump=_n

. bysort gpcb_id month16: keep if _n==_N
(432 observations deleted)

. keep industry_id gpcb_id month16 treatmentstatus ind_month_mass_val* 

. ** 7,008 observations. 292 plants. 24 months from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/PlantMonthPMMassNoRule.dta", replace
(file 02DataPipeline/emissions/imputation/PlantMonthPMMassNoRule.dta not found)
file 02DataPipeline/emissions/imputation/PlantMonthPMMassNoRule.dta saved

. 
. restore

. 
. /*******************************************************************************
>            NOW WE MAKE THE DEPENDENT VARIABLE FOR PLOTTING TIME SERIES 
>            THIS VAR IS PLANT WEEK MASS (KG).
>    ****************************************************************************/
. 
. preserve

. 
. ********************************************************************************
. ********************* [7.1] GENERATE STACK-WEEK MASS (KG) **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate WEEKLY validated emissions PER STACK
.         bysort composite_id week: egen stack_week_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id week: egen miss_stack_week_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_week_mass_val_rule`i' = . if miss_stack_week_mass_val == 1
  5.         la var stack_week_mass_val_rule`i' ///
>                 "Stack-week Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_stack_week_mass_val
  7. 
. }
(77,721 real changes made, 77,721 to missing)
(77,182 real changes made, 77,182 to missing)
(119,617 real changes made, 119,617 to missing)
(119,246 real changes made, 119,246 to missing)
(141,866 real changes made, 141,866 to missing)
(141,642 real changes made, 141,642 to missing)
(129,965 real changes made, 129,965 to missing)
(129,650 real changes made, 129,650 to missing)
(96,226 real changes made, 96,226 to missing)
(95,778 real changes made, 95,778 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id week: gen dump=_n

. bysort composite_id week: keep if _n==_N        
(190,960 observations deleted)

. keep composite_id industry_id gpcb_id week treatmentstatus stack_week_mass_val*

. ** 31,930 Observations. 310 Stacks. 103 weeks from April 2019 to March 2021.
. 
. ********************************************************************************
. ******************** [7.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate WEEKLY validated emissions PER PLANT
.         bysort gpcb_id week: egen ind_week_mass_val_rule`i' = sum(stack_week_mass_val_rule`i')
  3.         bysort gpcb_id week: egen miss_ind_week_mass_val = max(missing(stack_week_mass_val_rule`i'))
  4.         replace ind_week_mass_val_rule`i' = . if miss_ind_week_mass_val == 1
  5.         la var stack_week_mass_val_rule`i' ///
>                 "Plant-week Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_week_mass_val
  7. 
. }
(11,515 real changes made, 11,515 to missing)
(11,438 real changes made, 11,438 to missing)
(17,385 real changes made, 17,385 to missing)
(17,332 real changes made, 17,332 to missing)
(20,582 real changes made, 20,582 to missing)
(20,552 real changes made, 20,552 to missing)
(18,815 real changes made, 18,815 to missing)
(18,772 real changes made, 18,772 to missing)
(14,099 real changes made, 14,099 to missing)
(14,035 real changes made, 14,035 to missing)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id week: gen dump=_n

. bysort gpcb_id week: keep if _n==_N
(1,854 observations deleted)

. keep industry_id gpcb_id week treatmentstatus ind_week_mass_val* 

. ** 30,076 Observations. 292 Plants. 103 weeks from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/PlantWeekPMMassNoRule.dta", replace
(file 02DataPipeline/emissions/imputation/PlantWeekPMMassNoRule.dta not found)
file 02DataPipeline/emissions/imputation/PlantWeekPMMassNoRule.dta saved

. 
. restore

. 
. 
end of do-file

. do "$CODE_DIR/imputation/3a. Create PM Mass (Stack-Month, Plant-Day).do"

. /*******************************************************************************
>            Project: ETS
>            Purpose: Create the dependent variable for regression, PLANT-MONTH KG 
>            EMISSIONS (KG/MONTH), using IMPUTATION RULE A: WITHIN-STACK 
>            MEAN MONTH KG/HR.
> 
>            Note: IMPUTATION RULE A is executed as follows:
> 
>            1) Missing values of Stack day kg/hr are imputed with the stack's 
>            own week mean kg/hr.
> 
>            2) If no week mean kg/hr (i.e., stack is missing entire week 
>            of stack-day observations, or is not CEMS-connected), all remaining 
>            missing values of Stack day kg/hr are imputed with the stack's own 
>            month mean kg/hr
>    ****************************************************************************/
. 
. set more off

. clear all

. pause on

. 
. *-------------------------------------------------------------------------------
. 
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. drop if date < date("2019jan16", "YMD")
(0 observations deleted)

. format date %tddd-Mon-YY

. sort date composite_id

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        337        0.14        0.14
  17-Apr-19 |        337        0.14        0.28
  18-Apr-19 |        337        0.14        0.42
  19-Apr-19 |        337        0.14        0.56
  20-Apr-19 |        337        0.14        0.70
  21-Apr-19 |        337        0.14        0.83
  22-Apr-19 |        337        0.14        0.97
  23-Apr-19 |        337        0.14        1.11
  24-Apr-19 |        337        0.14        1.25
  25-Apr-19 |        337        0.14        1.39
  26-Apr-19 |        337        0.14        1.53
  27-Apr-19 |        337        0.14        1.67
  28-Apr-19 |        337        0.14        1.81
  29-Apr-19 |        337        0.14        1.95
  30-Apr-19 |        337        0.14        2.09
   1-May-19 |        337        0.14        2.23
   2-May-19 |        337        0.14        2.36
   3-May-19 |        337        0.14        2.50
   4-May-19 |        337        0.14        2.64
   5-May-19 |        337        0.14        2.78
   6-May-19 |        337        0.14        2.92
   7-May-19 |        337        0.14        3.06
   8-May-19 |        337        0.14        3.20
   9-May-19 |        337        0.14        3.34
  10-May-19 |        337        0.14        3.48
  11-May-19 |        337        0.14        3.62
  12-May-19 |        337        0.14        3.76
  13-May-19 |        337        0.14        3.89
  14-May-19 |        337        0.14        4.03
  15-May-19 |        337        0.14        4.17
  16-May-19 |        337        0.14        4.31
  17-May-19 |        337        0.14        4.45
  18-May-19 |        337        0.14        4.59
  19-May-19 |        337        0.14        4.73
  20-May-19 |        337        0.14        4.87
  21-May-19 |        337        0.14        5.01
  22-May-19 |        337        0.14        5.15
  23-May-19 |        337        0.14        5.29
  24-May-19 |        337        0.14        5.42
  25-May-19 |        337        0.14        5.56
  26-May-19 |        337        0.14        5.70
  27-May-19 |        337        0.14        5.84
  28-May-19 |        337        0.14        5.98
  29-May-19 |        337        0.14        6.12
  30-May-19 |        337        0.14        6.26
  31-May-19 |        337        0.14        6.40
   1-Jun-19 |        337        0.14        6.54
   2-Jun-19 |        337        0.14        6.68
   3-Jun-19 |        337        0.14        6.82
   4-Jun-19 |        337        0.14        6.95
   5-Jun-19 |        337        0.14        7.09
   6-Jun-19 |        337        0.14        7.23
   7-Jun-19 |        337        0.14        7.37
   8-Jun-19 |        337        0.14        7.51
   9-Jun-19 |        337        0.14        7.65
  10-Jun-19 |        337        0.14        7.79
  11-Jun-19 |        337        0.14        7.93
  12-Jun-19 |        337        0.14        8.07
  13-Jun-19 |        337        0.14        8.21
  14-Jun-19 |        337        0.14        8.34
  15-Jun-19 |        337        0.14        8.48
  16-Jun-19 |        337        0.14        8.62
  17-Jun-19 |        337        0.14        8.76
  18-Jun-19 |        337        0.14        8.90
  19-Jun-19 |        337        0.14        9.04
  20-Jun-19 |        337        0.14        9.18
  21-Jun-19 |        337        0.14        9.32
  22-Jun-19 |        337        0.14        9.46
  23-Jun-19 |        337        0.14        9.60
  24-Jun-19 |        337        0.14        9.74
  25-Jun-19 |        337        0.14        9.87
  26-Jun-19 |        337        0.14       10.01
  27-Jun-19 |        337        0.14       10.15
  28-Jun-19 |        337        0.14       10.29
  29-Jun-19 |        337        0.14       10.43
  30-Jun-19 |        337        0.14       10.57
   1-Jul-19 |        337        0.14       10.71
   2-Jul-19 |        337        0.14       10.85
   3-Jul-19 |        337        0.14       10.99
   4-Jul-19 |        337        0.14       11.13
   5-Jul-19 |        337        0.14       11.27
   6-Jul-19 |        337        0.14       11.40
   7-Jul-19 |        337        0.14       11.54
   8-Jul-19 |        337        0.14       11.68
   9-Jul-19 |        337        0.14       11.82
  10-Jul-19 |        337        0.14       11.96
  11-Jul-19 |        337        0.14       12.10
  12-Jul-19 |        337        0.14       12.24
  13-Jul-19 |        337        0.14       12.38
  14-Jul-19 |        337        0.14       12.52
  15-Jul-19 |        337        0.14       12.66
  16-Jul-19 |        337        0.14       12.80
  17-Jul-19 |        337        0.14       12.93
  18-Jul-19 |        337        0.14       13.07
  19-Jul-19 |        337        0.14       13.21
  20-Jul-19 |        337        0.14       13.35
  21-Jul-19 |        337        0.14       13.49
  22-Jul-19 |        337        0.14       13.63
  23-Jul-19 |        337        0.14       13.77
  24-Jul-19 |        337        0.14       13.91
  25-Jul-19 |        337        0.14       14.05
  26-Jul-19 |        337        0.14       14.19
  27-Jul-19 |        337        0.14       14.33
  28-Jul-19 |        337        0.14       14.46
  29-Jul-19 |        337        0.14       14.60
  30-Jul-19 |        337        0.14       14.74
  31-Jul-19 |        337        0.14       14.88
   1-Aug-19 |        337        0.14       15.02
   2-Aug-19 |        337        0.14       15.16
   3-Aug-19 |        337        0.14       15.30
   4-Aug-19 |        337        0.14       15.44
   5-Aug-19 |        337        0.14       15.58
   6-Aug-19 |        337        0.14       15.72
   7-Aug-19 |        337        0.14       15.86
   8-Aug-19 |        337        0.14       15.99
   9-Aug-19 |        337        0.14       16.13
  10-Aug-19 |        337        0.14       16.27
  11-Aug-19 |        337        0.14       16.41
  12-Aug-19 |        337        0.14       16.55
  13-Aug-19 |        337        0.14       16.69
  14-Aug-19 |        337        0.14       16.83
  15-Aug-19 |        337        0.14       16.97
  16-Aug-19 |        337        0.14       17.11
  17-Aug-19 |        337        0.14       17.25
  18-Aug-19 |        337        0.14       17.39
  19-Aug-19 |        337        0.14       17.52
  20-Aug-19 |        337        0.14       17.66
  21-Aug-19 |        337        0.14       17.80
  22-Aug-19 |        337        0.14       17.94
  23-Aug-19 |        337        0.14       18.08
  24-Aug-19 |        337        0.14       18.22
  25-Aug-19 |        337        0.14       18.36
  26-Aug-19 |        337        0.14       18.50
  27-Aug-19 |        337        0.14       18.64
  28-Aug-19 |        337        0.14       18.78
  29-Aug-19 |        337        0.14       18.92
  30-Aug-19 |        337        0.14       19.05
  31-Aug-19 |        337        0.14       19.19
   1-Sep-19 |        337        0.14       19.33
   2-Sep-19 |        337        0.14       19.47
   3-Sep-19 |        337        0.14       19.61
   4-Sep-19 |        337        0.14       19.75
   5-Sep-19 |        337        0.14       19.89
   6-Sep-19 |        337        0.14       20.03
   7-Sep-19 |        337        0.14       20.17
   8-Sep-19 |        337        0.14       20.31
   9-Sep-19 |        337        0.14       20.45
  10-Sep-19 |        337        0.14       20.58
  11-Sep-19 |        337        0.14       20.72
  12-Sep-19 |        337        0.14       20.86
  13-Sep-19 |        337        0.14       21.00
  14-Sep-19 |        337        0.14       21.14
  15-Sep-19 |        337        0.14       21.28
  16-Sep-19 |        337        0.14       21.42
  17-Sep-19 |        337        0.14       21.56
  18-Sep-19 |        337        0.14       21.70
  19-Sep-19 |        337        0.14       21.84
  20-Sep-19 |        337        0.14       21.97
  21-Sep-19 |        337        0.14       22.11
  22-Sep-19 |        337        0.14       22.25
  23-Sep-19 |        337        0.14       22.39
  24-Sep-19 |        337        0.14       22.53
  25-Sep-19 |        337        0.14       22.67
  26-Sep-19 |        337        0.14       22.81
  27-Sep-19 |        337        0.14       22.95
  28-Sep-19 |        337        0.14       23.09
  29-Sep-19 |        337        0.14       23.23
  30-Sep-19 |        337        0.14       23.37
   1-Oct-19 |        337        0.14       23.50
   2-Oct-19 |        337        0.14       23.64
   3-Oct-19 |        337        0.14       23.78
   4-Oct-19 |        337        0.14       23.92
   5-Oct-19 |        337        0.14       24.06
   6-Oct-19 |        337        0.14       24.20
   7-Oct-19 |        337        0.14       24.34
   8-Oct-19 |        337        0.14       24.48
   9-Oct-19 |        337        0.14       24.62
  10-Oct-19 |        337        0.14       24.76
  11-Oct-19 |        337        0.14       24.90
  12-Oct-19 |        337        0.14       25.03
  13-Oct-19 |        337        0.14       25.17
  14-Oct-19 |        337        0.14       25.31
  15-Oct-19 |        337        0.14       25.45
  16-Oct-19 |        337        0.14       25.59
  17-Oct-19 |        337        0.14       25.73
  18-Oct-19 |        337        0.14       25.87
  19-Oct-19 |        337        0.14       26.01
  20-Oct-19 |        337        0.14       26.15
  21-Oct-19 |        337        0.14       26.29
  22-Oct-19 |        337        0.14       26.43
  23-Oct-19 |        337        0.14       26.56
  24-Oct-19 |        337        0.14       26.70
  25-Oct-19 |        337        0.14       26.84
  26-Oct-19 |        337        0.14       26.98
  27-Oct-19 |        337        0.14       27.12
  28-Oct-19 |        337        0.14       27.26
  29-Oct-19 |        337        0.14       27.40
  30-Oct-19 |        337        0.14       27.54
  31-Oct-19 |        337        0.14       27.68
   1-Nov-19 |        337        0.14       27.82
   2-Nov-19 |        337        0.14       27.96
   3-Nov-19 |        337        0.14       28.09
   4-Nov-19 |        337        0.14       28.23
   5-Nov-19 |        337        0.14       28.37
   6-Nov-19 |        337        0.14       28.51
   7-Nov-19 |        337        0.14       28.65
   8-Nov-19 |        337        0.14       28.79
   9-Nov-19 |        337        0.14       28.93
  10-Nov-19 |        337        0.14       29.07
  11-Nov-19 |        337        0.14       29.21
  12-Nov-19 |        337        0.14       29.35
  13-Nov-19 |        337        0.14       29.49
  14-Nov-19 |        337        0.14       29.62
  15-Nov-19 |        337        0.14       29.76
  16-Nov-19 |        337        0.14       29.90
  17-Nov-19 |        337        0.14       30.04
  18-Nov-19 |        337        0.14       30.18
  19-Nov-19 |        337        0.14       30.32
  20-Nov-19 |        337        0.14       30.46
  21-Nov-19 |        337        0.14       30.60
  22-Nov-19 |        337        0.14       30.74
  23-Nov-19 |        337        0.14       30.88
  24-Nov-19 |        337        0.14       31.02
  25-Nov-19 |        337        0.14       31.15
  26-Nov-19 |        337        0.14       31.29
  27-Nov-19 |        337        0.14       31.43
  28-Nov-19 |        337        0.14       31.57
  29-Nov-19 |        337        0.14       31.71
  30-Nov-19 |        337        0.14       31.85
   1-Dec-19 |        337        0.14       31.99
   2-Dec-19 |        337        0.14       32.13
   3-Dec-19 |        337        0.14       32.27
   4-Dec-19 |        337        0.14       32.41
   5-Dec-19 |        337        0.14       32.55
   6-Dec-19 |        337        0.14       32.68
   7-Dec-19 |        337        0.14       32.82
   8-Dec-19 |        337        0.14       32.96
   9-Dec-19 |        337        0.14       33.10
  10-Dec-19 |        337        0.14       33.24
  11-Dec-19 |        337        0.14       33.38
  12-Dec-19 |        337        0.14       33.52
  13-Dec-19 |        337        0.14       33.66
  14-Dec-19 |        337        0.14       33.80
  15-Dec-19 |        337        0.14       33.94
  16-Dec-19 |        337        0.14       34.08
  17-Dec-19 |        337        0.14       34.21
  18-Dec-19 |        337        0.14       34.35
  19-Dec-19 |        337        0.14       34.49
  20-Dec-19 |        337        0.14       34.63
  21-Dec-19 |        337        0.14       34.77
  22-Dec-19 |        337        0.14       34.91
  23-Dec-19 |        337        0.14       35.05
  24-Dec-19 |        337        0.14       35.19
  25-Dec-19 |        337        0.14       35.33
  26-Dec-19 |        337        0.14       35.47
  27-Dec-19 |        337        0.14       35.61
  28-Dec-19 |        337        0.14       35.74
  29-Dec-19 |        337        0.14       35.88
  30-Dec-19 |        337        0.14       36.02
  31-Dec-19 |        337        0.14       36.16
   1-Jan-20 |        337        0.14       36.30
   2-Jan-20 |        337        0.14       36.44
   3-Jan-20 |        337        0.14       36.58
   4-Jan-20 |        337        0.14       36.72
   5-Jan-20 |        337        0.14       36.86
   6-Jan-20 |        337        0.14       37.00
   7-Jan-20 |        337        0.14       37.13
   8-Jan-20 |        337        0.14       37.27
   9-Jan-20 |        337        0.14       37.41
  10-Jan-20 |        337        0.14       37.55
  11-Jan-20 |        337        0.14       37.69
  12-Jan-20 |        337        0.14       37.83
  13-Jan-20 |        337        0.14       37.97
  14-Jan-20 |        337        0.14       38.11
  15-Jan-20 |        337        0.14       38.25
  16-Jan-20 |        337        0.14       38.39
  17-Jan-20 |        337        0.14       38.53
  18-Jan-20 |        337        0.14       38.66
  19-Jan-20 |        337        0.14       38.80
  20-Jan-20 |        337        0.14       38.94
  21-Jan-20 |        337        0.14       39.08
  22-Jan-20 |        337        0.14       39.22
  23-Jan-20 |        337        0.14       39.36
  24-Jan-20 |        337        0.14       39.50
  25-Jan-20 |        337        0.14       39.64
  26-Jan-20 |        337        0.14       39.78
  27-Jan-20 |        337        0.14       39.92
  28-Jan-20 |        337        0.14       40.06
  29-Jan-20 |        337        0.14       40.19
  30-Jan-20 |        337        0.14       40.33
  31-Jan-20 |        337        0.14       40.47
   1-Feb-20 |        337        0.14       40.61
   2-Feb-20 |        337        0.14       40.75
   3-Feb-20 |        337        0.14       40.89
   4-Feb-20 |        337        0.14       41.03
   5-Feb-20 |        337        0.14       41.17
   6-Feb-20 |        337        0.14       41.31
   7-Feb-20 |        337        0.14       41.45
   8-Feb-20 |        337        0.14       41.59
   9-Feb-20 |        337        0.14       41.72
  10-Feb-20 |        337        0.14       41.86
  11-Feb-20 |        337        0.14       42.00
  12-Feb-20 |        337        0.14       42.14
  13-Feb-20 |        337        0.14       42.28
  14-Feb-20 |        337        0.14       42.42
  15-Feb-20 |        337        0.14       42.56
  16-Feb-20 |        337        0.14       42.70
  17-Feb-20 |        337        0.14       42.84
  18-Feb-20 |        337        0.14       42.98
  19-Feb-20 |        337        0.14       43.12
  20-Feb-20 |        337        0.14       43.25
  21-Feb-20 |        337        0.14       43.39
  22-Feb-20 |        337        0.14       43.53
  23-Feb-20 |        337        0.14       43.67
  24-Feb-20 |        337        0.14       43.81
  25-Feb-20 |        337        0.14       43.95
  26-Feb-20 |        337        0.14       44.09
  27-Feb-20 |        337        0.14       44.23
  28-Feb-20 |        337        0.14       44.37
  29-Feb-20 |        337        0.14       44.51
   1-Mar-20 |        337        0.14       44.65
   2-Mar-20 |        337        0.14       44.78
   3-Mar-20 |        337        0.14       44.92
   4-Mar-20 |        337        0.14       45.06
   5-Mar-20 |        337        0.14       45.20
   6-Mar-20 |        337        0.14       45.34
   7-Mar-20 |        337        0.14       45.48
   8-Mar-20 |        337        0.14       45.62
   9-Mar-20 |        337        0.14       45.76
  10-Mar-20 |        337        0.14       45.90
  11-Mar-20 |        337        0.14       46.04
  12-Mar-20 |        337        0.14       46.18
  13-Mar-20 |        337        0.14       46.31
  14-Mar-20 |        337        0.14       46.45
  15-Mar-20 |        337        0.14       46.59
  16-Mar-20 |        337        0.14       46.73
  17-Mar-20 |        337        0.14       46.87
  18-Mar-20 |        337        0.14       47.01
  19-Mar-20 |        337        0.14       47.15
  20-Mar-20 |        337        0.14       47.29
  21-Mar-20 |        337        0.14       47.43
  22-Mar-20 |        337        0.14       47.57
  23-Mar-20 |        337        0.14       47.71
  24-Mar-20 |        337        0.14       47.84
  25-Mar-20 |        337        0.14       47.98
  26-Mar-20 |        337        0.14       48.12
  27-Mar-20 |        337        0.14       48.26
  28-Mar-20 |        337        0.14       48.40
  29-Mar-20 |        337        0.14       48.54
  30-Mar-20 |        337        0.14       48.68
  31-Mar-20 |        337        0.14       48.82
   1-Apr-20 |        337        0.14       48.96
   2-Apr-20 |        337        0.14       49.10
   3-Apr-20 |        337        0.14       49.24
   4-Apr-20 |        337        0.14       49.37
   5-Apr-20 |        337        0.14       49.51
   6-Apr-20 |        337        0.14       49.65
   7-Apr-20 |        337        0.14       49.79
   8-Apr-20 |        337        0.14       49.93
   9-Apr-20 |        337        0.14       50.07
  10-Apr-20 |        337        0.14       50.21
  11-Apr-20 |        337        0.14       50.35
  12-Apr-20 |        337        0.14       50.49
  13-Apr-20 |        337        0.14       50.63
  14-Apr-20 |        337        0.14       50.76
  15-Apr-20 |        337        0.14       50.90
  16-Apr-20 |        337        0.14       51.04
  17-Apr-20 |        337        0.14       51.18
  18-Apr-20 |        337        0.14       51.32
  19-Apr-20 |        337        0.14       51.46
  20-Apr-20 |        337        0.14       51.60
  21-Apr-20 |        337        0.14       51.74
  22-Apr-20 |        337        0.14       51.88
  23-Apr-20 |        337        0.14       52.02
  24-Apr-20 |        337        0.14       52.16
  25-Apr-20 |        337        0.14       52.29
  26-Apr-20 |        337        0.14       52.43
  27-Apr-20 |        337        0.14       52.57
  28-Apr-20 |        337        0.14       52.71
  29-Apr-20 |        337        0.14       52.85
  30-Apr-20 |        337        0.14       52.99
   1-May-20 |        337        0.14       53.13
   2-May-20 |        337        0.14       53.27
   3-May-20 |        337        0.14       53.41
   4-May-20 |        337        0.14       53.55
   5-May-20 |        337        0.14       53.69
   6-May-20 |        337        0.14       53.82
   7-May-20 |        337        0.14       53.96
   8-May-20 |        337        0.14       54.10
   9-May-20 |        337        0.14       54.24
  10-May-20 |        337        0.14       54.38
  11-May-20 |        337        0.14       54.52
  12-May-20 |        337        0.14       54.66
  13-May-20 |        337        0.14       54.80
  14-May-20 |        337        0.14       54.94
  15-May-20 |        337        0.14       55.08
  16-May-20 |        337        0.14       55.22
  17-May-20 |        337        0.14       55.35
  18-May-20 |        337        0.14       55.49
  19-May-20 |        337        0.14       55.63
  20-May-20 |        337        0.14       55.77
  21-May-20 |        337        0.14       55.91
  22-May-20 |        337        0.14       56.05
  23-May-20 |        337        0.14       56.19
  24-May-20 |        337        0.14       56.33
  25-May-20 |        337        0.14       56.47
  26-May-20 |        337        0.14       56.61
  27-May-20 |        337        0.14       56.75
  28-May-20 |        337        0.14       56.88
  29-May-20 |        337        0.14       57.02
  30-May-20 |        337        0.14       57.16
  31-May-20 |        337        0.14       57.30
   1-Jun-20 |        337        0.14       57.44
   2-Jun-20 |        337        0.14       57.58
   3-Jun-20 |        337        0.14       57.72
   4-Jun-20 |        337        0.14       57.86
   5-Jun-20 |        337        0.14       58.00
   6-Jun-20 |        337        0.14       58.14
   7-Jun-20 |        337        0.14       58.28
   8-Jun-20 |        337        0.14       58.41
   9-Jun-20 |        337        0.14       58.55
  10-Jun-20 |        337        0.14       58.69
  11-Jun-20 |        337        0.14       58.83
  12-Jun-20 |        337        0.14       58.97
  13-Jun-20 |        337        0.14       59.11
  14-Jun-20 |        337        0.14       59.25
  15-Jun-20 |        337        0.14       59.39
  16-Jun-20 |        337        0.14       59.53
  17-Jun-20 |        337        0.14       59.67
  18-Jun-20 |        337        0.14       59.81
  19-Jun-20 |        337        0.14       59.94
  20-Jun-20 |        337        0.14       60.08
  21-Jun-20 |        337        0.14       60.22
  22-Jun-20 |        337        0.14       60.36
  23-Jun-20 |        337        0.14       60.50
  24-Jun-20 |        337        0.14       60.64
  25-Jun-20 |        337        0.14       60.78
  26-Jun-20 |        337        0.14       60.92
  27-Jun-20 |        337        0.14       61.06
  28-Jun-20 |        337        0.14       61.20
  29-Jun-20 |        337        0.14       61.34
  30-Jun-20 |        337        0.14       61.47
   1-Jul-20 |        337        0.14       61.61
   2-Jul-20 |        337        0.14       61.75
   3-Jul-20 |        337        0.14       61.89
   4-Jul-20 |        337        0.14       62.03
   5-Jul-20 |        337        0.14       62.17
   6-Jul-20 |        337        0.14       62.31
   7-Jul-20 |        337        0.14       62.45
   8-Jul-20 |        337        0.14       62.59
   9-Jul-20 |        337        0.14       62.73
  10-Jul-20 |        337        0.14       62.87
  11-Jul-20 |        337        0.14       63.00
  12-Jul-20 |        337        0.14       63.14
  13-Jul-20 |        337        0.14       63.28
  14-Jul-20 |        337        0.14       63.42
  15-Jul-20 |        337        0.14       63.56
  16-Jul-20 |        337        0.14       63.70
  17-Jul-20 |        337        0.14       63.84
  18-Jul-20 |        337        0.14       63.98
  19-Jul-20 |        337        0.14       64.12
  20-Jul-20 |        337        0.14       64.26
  21-Jul-20 |        337        0.14       64.39
  22-Jul-20 |        337        0.14       64.53
  23-Jul-20 |        337        0.14       64.67
  24-Jul-20 |        337        0.14       64.81
  25-Jul-20 |        337        0.14       64.95
  26-Jul-20 |        337        0.14       65.09
  27-Jul-20 |        337        0.14       65.23
  28-Jul-20 |        337        0.14       65.37
  29-Jul-20 |        337        0.14       65.51
  30-Jul-20 |        337        0.14       65.65
  31-Jul-20 |        337        0.14       65.79
   1-Aug-20 |        337        0.14       65.92
   2-Aug-20 |        337        0.14       66.06
   3-Aug-20 |        337        0.14       66.20
   4-Aug-20 |        337        0.14       66.34
   5-Aug-20 |        337        0.14       66.48
   6-Aug-20 |        337        0.14       66.62
   7-Aug-20 |        337        0.14       66.76
   8-Aug-20 |        337        0.14       66.90
   9-Aug-20 |        337        0.14       67.04
  10-Aug-20 |        337        0.14       67.18
  11-Aug-20 |        337        0.14       67.32
  12-Aug-20 |        337        0.14       67.45
  13-Aug-20 |        337        0.14       67.59
  14-Aug-20 |        337        0.14       67.73
  15-Aug-20 |        337        0.14       67.87
  16-Aug-20 |        337        0.14       68.01
  17-Aug-20 |        337        0.14       68.15
  18-Aug-20 |        337        0.14       68.29
  19-Aug-20 |        337        0.14       68.43
  20-Aug-20 |        337        0.14       68.57
  21-Aug-20 |        337        0.14       68.71
  22-Aug-20 |        337        0.14       68.85
  23-Aug-20 |        337        0.14       68.98
  24-Aug-20 |        337        0.14       69.12
  25-Aug-20 |        337        0.14       69.26
  26-Aug-20 |        337        0.14       69.40
  27-Aug-20 |        337        0.14       69.54
  28-Aug-20 |        337        0.14       69.68
  29-Aug-20 |        337        0.14       69.82
  30-Aug-20 |        337        0.14       69.96
  31-Aug-20 |        337        0.14       70.10
   1-Sep-20 |        337        0.14       70.24
   2-Sep-20 |        337        0.14       70.38
   3-Sep-20 |        337        0.14       70.51
   4-Sep-20 |        337        0.14       70.65
   5-Sep-20 |        337        0.14       70.79
   6-Sep-20 |        337        0.14       70.93
   7-Sep-20 |        337        0.14       71.07
   8-Sep-20 |        337        0.14       71.21
   9-Sep-20 |        337        0.14       71.35
  10-Sep-20 |        337        0.14       71.49
  11-Sep-20 |        337        0.14       71.63
  12-Sep-20 |        337        0.14       71.77
  13-Sep-20 |        337        0.14       71.91
  14-Sep-20 |        337        0.14       72.04
  15-Sep-20 |        337        0.14       72.18
  16-Sep-20 |        337        0.14       72.32
  17-Sep-20 |        337        0.14       72.46
  18-Sep-20 |        337        0.14       72.60
  19-Sep-20 |        337        0.14       72.74
  20-Sep-20 |        337        0.14       72.88
  21-Sep-20 |        337        0.14       73.02
  22-Sep-20 |        337        0.14       73.16
  23-Sep-20 |        337        0.14       73.30
  24-Sep-20 |        337        0.14       73.44
  25-Sep-20 |        337        0.14       73.57
  26-Sep-20 |        337        0.14       73.71
  27-Sep-20 |        337        0.14       73.85
  28-Sep-20 |        337        0.14       73.99
  29-Sep-20 |        337        0.14       74.13
  30-Sep-20 |        337        0.14       74.27
   1-Oct-20 |        337        0.14       74.41
   2-Oct-20 |        337        0.14       74.55
   3-Oct-20 |        337        0.14       74.69
   4-Oct-20 |        337        0.14       74.83
   5-Oct-20 |        337        0.14       74.97
   6-Oct-20 |        337        0.14       75.10
   7-Oct-20 |        337        0.14       75.24
   8-Oct-20 |        337        0.14       75.38
   9-Oct-20 |        337        0.14       75.52
  10-Oct-20 |        337        0.14       75.66
  11-Oct-20 |        337        0.14       75.80
  12-Oct-20 |        337        0.14       75.94
  13-Oct-20 |        337        0.14       76.08
  14-Oct-20 |        337        0.14       76.22
  15-Oct-20 |        337        0.14       76.36
  16-Oct-20 |        337        0.14       76.50
  17-Oct-20 |        337        0.14       76.63
  18-Oct-20 |        337        0.14       76.77
  19-Oct-20 |        337        0.14       76.91
  20-Oct-20 |        337        0.14       77.05
  21-Oct-20 |        337        0.14       77.19
  22-Oct-20 |        337        0.14       77.33
  23-Oct-20 |        337        0.14       77.47
  24-Oct-20 |        337        0.14       77.61
  25-Oct-20 |        337        0.14       77.75
  26-Oct-20 |        337        0.14       77.89
  27-Oct-20 |        337        0.14       78.03
  28-Oct-20 |        337        0.14       78.16
  29-Oct-20 |        337        0.14       78.30
  30-Oct-20 |        337        0.14       78.44
  31-Oct-20 |        337        0.14       78.58
   1-Nov-20 |        337        0.14       78.72
   2-Nov-20 |        337        0.14       78.86
   3-Nov-20 |        337        0.14       79.00
   4-Nov-20 |        337        0.14       79.14
   5-Nov-20 |        337        0.14       79.28
   6-Nov-20 |        337        0.14       79.42
   7-Nov-20 |        337        0.14       79.55
   8-Nov-20 |        337        0.14       79.69
   9-Nov-20 |        337        0.14       79.83
  10-Nov-20 |        337        0.14       79.97
  11-Nov-20 |        337        0.14       80.11
  12-Nov-20 |        337        0.14       80.25
  13-Nov-20 |        337        0.14       80.39
  14-Nov-20 |        337        0.14       80.53
  15-Nov-20 |        337        0.14       80.67
  16-Nov-20 |        337        0.14       80.81
  17-Nov-20 |        337        0.14       80.95
  18-Nov-20 |        337        0.14       81.08
  19-Nov-20 |        337        0.14       81.22
  20-Nov-20 |        337        0.14       81.36
  21-Nov-20 |        337        0.14       81.50
  22-Nov-20 |        337        0.14       81.64
  23-Nov-20 |        337        0.14       81.78
  24-Nov-20 |        337        0.14       81.92
  25-Nov-20 |        337        0.14       82.06
  26-Nov-20 |        337        0.14       82.20
  27-Nov-20 |        337        0.14       82.34
  28-Nov-20 |        337        0.14       82.48
  29-Nov-20 |        337        0.14       82.61
  30-Nov-20 |        337        0.14       82.75
   1-Dec-20 |        337        0.14       82.89
   2-Dec-20 |        337        0.14       83.03
   3-Dec-20 |        337        0.14       83.17
   4-Dec-20 |        337        0.14       83.31
   5-Dec-20 |        337        0.14       83.45
   6-Dec-20 |        337        0.14       83.59
   7-Dec-20 |        337        0.14       83.73
   8-Dec-20 |        337        0.14       83.87
   9-Dec-20 |        337        0.14       84.01
  10-Dec-20 |        337        0.14       84.14
  11-Dec-20 |        337        0.14       84.28
  12-Dec-20 |        337        0.14       84.42
  13-Dec-20 |        337        0.14       84.56
  14-Dec-20 |        337        0.14       84.70
  15-Dec-20 |        337        0.14       84.84
  16-Dec-20 |        337        0.14       84.98
  17-Dec-20 |        337        0.14       85.12
  18-Dec-20 |        337        0.14       85.26
  19-Dec-20 |        337        0.14       85.40
  20-Dec-20 |        337        0.14       85.54
  21-Dec-20 |        337        0.14       85.67
  22-Dec-20 |        337        0.14       85.81
  23-Dec-20 |        337        0.14       85.95
  24-Dec-20 |        337        0.14       86.09
  25-Dec-20 |        337        0.14       86.23
  26-Dec-20 |        337        0.14       86.37
  27-Dec-20 |        337        0.14       86.51
  28-Dec-20 |        337        0.14       86.65
  29-Dec-20 |        337        0.14       86.79
  30-Dec-20 |        337        0.14       86.93
  31-Dec-20 |        337        0.14       87.07
   1-Jan-21 |        337        0.14       87.20
   2-Jan-21 |        337        0.14       87.34
   3-Jan-21 |        337        0.14       87.48
   4-Jan-21 |        337        0.14       87.62
   5-Jan-21 |        337        0.14       87.76
   6-Jan-21 |        337        0.14       87.90
   7-Jan-21 |        337        0.14       88.04
   8-Jan-21 |        337        0.14       88.18
   9-Jan-21 |        337        0.14       88.32
  10-Jan-21 |        337        0.14       88.46
  11-Jan-21 |        337        0.14       88.60
  12-Jan-21 |        337        0.14       88.73
  13-Jan-21 |        337        0.14       88.87
  14-Jan-21 |        337        0.14       89.01
  15-Jan-21 |        337        0.14       89.15
  16-Jan-21 |        337        0.14       89.29
  17-Jan-21 |        337        0.14       89.43
  18-Jan-21 |        337        0.14       89.57
  19-Jan-21 |        337        0.14       89.71
  20-Jan-21 |        337        0.14       89.85
  21-Jan-21 |        337        0.14       89.99
  22-Jan-21 |        337        0.14       90.13
  23-Jan-21 |        337        0.14       90.26
  24-Jan-21 |        337        0.14       90.40
  25-Jan-21 |        337        0.14       90.54
  26-Jan-21 |        337        0.14       90.68
  27-Jan-21 |        337        0.14       90.82
  28-Jan-21 |        337        0.14       90.96
  29-Jan-21 |        337        0.14       91.10
  30-Jan-21 |        337        0.14       91.24
  31-Jan-21 |        337        0.14       91.38
   1-Feb-21 |        337        0.14       91.52
   2-Feb-21 |        337        0.14       91.66
   3-Feb-21 |        337        0.14       91.79
   4-Feb-21 |        337        0.14       91.93
   5-Feb-21 |        337        0.14       92.07
   6-Feb-21 |        337        0.14       92.21
   7-Feb-21 |        337        0.14       92.35
   8-Feb-21 |        337        0.14       92.49
   9-Feb-21 |        337        0.14       92.63
  10-Feb-21 |        337        0.14       92.77
  11-Feb-21 |        337        0.14       92.91
  12-Feb-21 |        337        0.14       93.05
  13-Feb-21 |        337        0.14       93.18
  14-Feb-21 |        337        0.14       93.32
  15-Feb-21 |        337        0.14       93.46
  16-Feb-21 |        337        0.14       93.60
  17-Feb-21 |        337        0.14       93.74
  18-Feb-21 |        337        0.14       93.88
  19-Feb-21 |        337        0.14       94.02
  20-Feb-21 |        337        0.14       94.16
  21-Feb-21 |        337        0.14       94.30
  22-Feb-21 |        337        0.14       94.44
  23-Feb-21 |        337        0.14       94.58
  24-Feb-21 |        337        0.14       94.71
  25-Feb-21 |        337        0.14       94.85
  26-Feb-21 |        337        0.14       94.99
  27-Feb-21 |        337        0.14       95.13
  28-Feb-21 |        337        0.14       95.27
   1-Mar-21 |        337        0.14       95.41
   2-Mar-21 |        337        0.14       95.55
   3-Mar-21 |        337        0.14       95.69
   4-Mar-21 |        337        0.14       95.83
   5-Mar-21 |        337        0.14       95.97
   6-Mar-21 |        337        0.14       96.11
   7-Mar-21 |        337        0.14       96.24
   8-Mar-21 |        337        0.14       96.38
   9-Mar-21 |        337        0.14       96.52
  10-Mar-21 |        337        0.14       96.66
  11-Mar-21 |        337        0.14       96.80
  12-Mar-21 |        337        0.14       96.94
  13-Mar-21 |        337        0.14       97.08
  14-Mar-21 |        337        0.14       97.22
  15-Mar-21 |        337        0.14       97.36
  16-Mar-21 |        337        0.14       97.50
  17-Mar-21 |        337        0.14       97.64
  18-Mar-21 |        337        0.14       97.77
  19-Mar-21 |        337        0.14       97.91
  20-Mar-21 |        337        0.14       98.05
  21-Mar-21 |        337        0.14       98.19
  22-Mar-21 |        337        0.14       98.33
  23-Mar-21 |        337        0.14       98.47
  24-Mar-21 |        337        0.14       98.61
  25-Mar-21 |        337        0.14       98.75
  26-Mar-21 |        337        0.14       98.89
  27-Mar-21 |        337        0.14       99.03
  28-Mar-21 |        337        0.14       99.17
  29-Mar-21 |        337        0.14       99.30
  30-Mar-21 |        337        0.14       99.44
  31-Mar-21 |        337        0.14       99.58
   1-Apr-21 |        337        0.14       99.72
   2-Apr-21 |        337        0.14       99.86
   3-Apr-21 |        337        0.14      100.00
------------+-----------------------------------
      Total |    242,303      100.00

. ** 242,303 Observations. 337 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ** Generate a week variable
. drop week

. gen int week = floor((date-td(31dec2018))/7)+1

. la var week "Week"

. 
. ** Generate a month variable which goes from the 16th of each month to the 15th of the next month. 
. ** This definition of month aligns with the implementation of ETS market in its initial Stages. 
. ** Nick Cox's code:
. drop month16

. gen month16 = date if day(date) == 16
(234,215 missing values generated)

. //      replace month16 = mdy(1, 16, 2019) in 1
. replace month16 = month16[_n-1] if missing(month16)
(234,215 real changes made)

. la var month16 "Month, defined as 16th of this month to 15th of next month"

. gen month16_sif = month16

. format month16 %tddd-Mon-YY

. la var month16_sif "[SIF] Month-year. For convenience."

. order month16_sif, a(month16)

. sort composite_id date

. ** Check days in each month for one device. Looks good.
. *tab month16 if composite_id == "GJSRT100740111"
. 
. ** Generate Dummy for Interregnum period of market
. ** Covid lockdown -- 23 March 2020 to 11 October 2021. 
. ** Mock-III started on 12 October 2021.
. gen D_interregnum_week = week >= 65 & week <= 93

. replace D_interregnum_week =1 if week == 99 | week == 100
(4,718 real changes made)

. la var D_interregnum_week ///
>         "[Week-level] =1 if Interregnum due to Covid-19 lockdown, zero otherwise."

. 
. drop extinct_with_assignment removed_from_sample comment

. 
. ** Remove plants that have no observation from 16-Apr-19 to 03-Apr-21.
. bysort gpcb_id: egen pct_report = mean(!missing(pm_mass_rule0)) if ///
>         month16 >= date("2019jul16", "YMD") & D_interregnum_week == 0
(103,796 missing values generated)

. sort composite_id date

. bysort gpcb_id: egen pct_report_1 = mean(pct_report)

. drop if pct_report_1 == 0
(19,413 observations deleted)

. drop pct_report pct_report_1

. sort composite_id date  

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        310        0.14        0.14
  17-Apr-19 |        310        0.14        0.28
  18-Apr-19 |        310        0.14        0.42
  19-Apr-19 |        310        0.14        0.56
  20-Apr-19 |        310        0.14        0.70
  21-Apr-19 |        310        0.14        0.83
  22-Apr-19 |        310        0.14        0.97
  23-Apr-19 |        310        0.14        1.11
  24-Apr-19 |        310        0.14        1.25
  25-Apr-19 |        310        0.14        1.39
  26-Apr-19 |        310        0.14        1.53
  27-Apr-19 |        310        0.14        1.67
  28-Apr-19 |        310        0.14        1.81
  29-Apr-19 |        310        0.14        1.95
  30-Apr-19 |        310        0.14        2.09
   1-May-19 |        310        0.14        2.23
   2-May-19 |        310        0.14        2.36
   3-May-19 |        310        0.14        2.50
   4-May-19 |        310        0.14        2.64
   5-May-19 |        310        0.14        2.78
   6-May-19 |        310        0.14        2.92
   7-May-19 |        310        0.14        3.06
   8-May-19 |        310        0.14        3.20
   9-May-19 |        310        0.14        3.34
  10-May-19 |        310        0.14        3.48
  11-May-19 |        310        0.14        3.62
  12-May-19 |        310        0.14        3.76
  13-May-19 |        310        0.14        3.89
  14-May-19 |        310        0.14        4.03
  15-May-19 |        310        0.14        4.17
  16-May-19 |        310        0.14        4.31
  17-May-19 |        310        0.14        4.45
  18-May-19 |        310        0.14        4.59
  19-May-19 |        310        0.14        4.73
  20-May-19 |        310        0.14        4.87
  21-May-19 |        310        0.14        5.01
  22-May-19 |        310        0.14        5.15
  23-May-19 |        310        0.14        5.29
  24-May-19 |        310        0.14        5.42
  25-May-19 |        310        0.14        5.56
  26-May-19 |        310        0.14        5.70
  27-May-19 |        310        0.14        5.84
  28-May-19 |        310        0.14        5.98
  29-May-19 |        310        0.14        6.12
  30-May-19 |        310        0.14        6.26
  31-May-19 |        310        0.14        6.40
   1-Jun-19 |        310        0.14        6.54
   2-Jun-19 |        310        0.14        6.68
   3-Jun-19 |        310        0.14        6.82
   4-Jun-19 |        310        0.14        6.95
   5-Jun-19 |        310        0.14        7.09
   6-Jun-19 |        310        0.14        7.23
   7-Jun-19 |        310        0.14        7.37
   8-Jun-19 |        310        0.14        7.51
   9-Jun-19 |        310        0.14        7.65
  10-Jun-19 |        310        0.14        7.79
  11-Jun-19 |        310        0.14        7.93
  12-Jun-19 |        310        0.14        8.07
  13-Jun-19 |        310        0.14        8.21
  14-Jun-19 |        310        0.14        8.34
  15-Jun-19 |        310        0.14        8.48
  16-Jun-19 |        310        0.14        8.62
  17-Jun-19 |        310        0.14        8.76
  18-Jun-19 |        310        0.14        8.90
  19-Jun-19 |        310        0.14        9.04
  20-Jun-19 |        310        0.14        9.18
  21-Jun-19 |        310        0.14        9.32
  22-Jun-19 |        310        0.14        9.46
  23-Jun-19 |        310        0.14        9.60
  24-Jun-19 |        310        0.14        9.74
  25-Jun-19 |        310        0.14        9.87
  26-Jun-19 |        310        0.14       10.01
  27-Jun-19 |        310        0.14       10.15
  28-Jun-19 |        310        0.14       10.29
  29-Jun-19 |        310        0.14       10.43
  30-Jun-19 |        310        0.14       10.57
   1-Jul-19 |        310        0.14       10.71
   2-Jul-19 |        310        0.14       10.85
   3-Jul-19 |        310        0.14       10.99
   4-Jul-19 |        310        0.14       11.13
   5-Jul-19 |        310        0.14       11.27
   6-Jul-19 |        310        0.14       11.40
   7-Jul-19 |        310        0.14       11.54
   8-Jul-19 |        310        0.14       11.68
   9-Jul-19 |        310        0.14       11.82
  10-Jul-19 |        310        0.14       11.96
  11-Jul-19 |        310        0.14       12.10
  12-Jul-19 |        310        0.14       12.24
  13-Jul-19 |        310        0.14       12.38
  14-Jul-19 |        310        0.14       12.52
  15-Jul-19 |        310        0.14       12.66
  16-Jul-19 |        310        0.14       12.80
  17-Jul-19 |        310        0.14       12.93
  18-Jul-19 |        310        0.14       13.07
  19-Jul-19 |        310        0.14       13.21
  20-Jul-19 |        310        0.14       13.35
  21-Jul-19 |        310        0.14       13.49
  22-Jul-19 |        310        0.14       13.63
  23-Jul-19 |        310        0.14       13.77
  24-Jul-19 |        310        0.14       13.91
  25-Jul-19 |        310        0.14       14.05
  26-Jul-19 |        310        0.14       14.19
  27-Jul-19 |        310        0.14       14.33
  28-Jul-19 |        310        0.14       14.46
  29-Jul-19 |        310        0.14       14.60
  30-Jul-19 |        310        0.14       14.74
  31-Jul-19 |        310        0.14       14.88
   1-Aug-19 |        310        0.14       15.02
   2-Aug-19 |        310        0.14       15.16
   3-Aug-19 |        310        0.14       15.30
   4-Aug-19 |        310        0.14       15.44
   5-Aug-19 |        310        0.14       15.58
   6-Aug-19 |        310        0.14       15.72
   7-Aug-19 |        310        0.14       15.86
   8-Aug-19 |        310        0.14       15.99
   9-Aug-19 |        310        0.14       16.13
  10-Aug-19 |        310        0.14       16.27
  11-Aug-19 |        310        0.14       16.41
  12-Aug-19 |        310        0.14       16.55
  13-Aug-19 |        310        0.14       16.69
  14-Aug-19 |        310        0.14       16.83
  15-Aug-19 |        310        0.14       16.97
  16-Aug-19 |        310        0.14       17.11
  17-Aug-19 |        310        0.14       17.25
  18-Aug-19 |        310        0.14       17.39
  19-Aug-19 |        310        0.14       17.52
  20-Aug-19 |        310        0.14       17.66
  21-Aug-19 |        310        0.14       17.80
  22-Aug-19 |        310        0.14       17.94
  23-Aug-19 |        310        0.14       18.08
  24-Aug-19 |        310        0.14       18.22
  25-Aug-19 |        310        0.14       18.36
  26-Aug-19 |        310        0.14       18.50
  27-Aug-19 |        310        0.14       18.64
  28-Aug-19 |        310        0.14       18.78
  29-Aug-19 |        310        0.14       18.92
  30-Aug-19 |        310        0.14       19.05
  31-Aug-19 |        310        0.14       19.19
   1-Sep-19 |        310        0.14       19.33
   2-Sep-19 |        310        0.14       19.47
   3-Sep-19 |        310        0.14       19.61
   4-Sep-19 |        310        0.14       19.75
   5-Sep-19 |        310        0.14       19.89
   6-Sep-19 |        310        0.14       20.03
   7-Sep-19 |        310        0.14       20.17
   8-Sep-19 |        310        0.14       20.31
   9-Sep-19 |        310        0.14       20.45
  10-Sep-19 |        310        0.14       20.58
  11-Sep-19 |        310        0.14       20.72
  12-Sep-19 |        310        0.14       20.86
  13-Sep-19 |        310        0.14       21.00
  14-Sep-19 |        310        0.14       21.14
  15-Sep-19 |        310        0.14       21.28
  16-Sep-19 |        310        0.14       21.42
  17-Sep-19 |        310        0.14       21.56
  18-Sep-19 |        310        0.14       21.70
  19-Sep-19 |        310        0.14       21.84
  20-Sep-19 |        310        0.14       21.97
  21-Sep-19 |        310        0.14       22.11
  22-Sep-19 |        310        0.14       22.25
  23-Sep-19 |        310        0.14       22.39
  24-Sep-19 |        310        0.14       22.53
  25-Sep-19 |        310        0.14       22.67
  26-Sep-19 |        310        0.14       22.81
  27-Sep-19 |        310        0.14       22.95
  28-Sep-19 |        310        0.14       23.09
  29-Sep-19 |        310        0.14       23.23
  30-Sep-19 |        310        0.14       23.37
   1-Oct-19 |        310        0.14       23.50
   2-Oct-19 |        310        0.14       23.64
   3-Oct-19 |        310        0.14       23.78
   4-Oct-19 |        310        0.14       23.92
   5-Oct-19 |        310        0.14       24.06
   6-Oct-19 |        310        0.14       24.20
   7-Oct-19 |        310        0.14       24.34
   8-Oct-19 |        310        0.14       24.48
   9-Oct-19 |        310        0.14       24.62
  10-Oct-19 |        310        0.14       24.76
  11-Oct-19 |        310        0.14       24.90
  12-Oct-19 |        310        0.14       25.03
  13-Oct-19 |        310        0.14       25.17
  14-Oct-19 |        310        0.14       25.31
  15-Oct-19 |        310        0.14       25.45
  16-Oct-19 |        310        0.14       25.59
  17-Oct-19 |        310        0.14       25.73
  18-Oct-19 |        310        0.14       25.87
  19-Oct-19 |        310        0.14       26.01
  20-Oct-19 |        310        0.14       26.15
  21-Oct-19 |        310        0.14       26.29
  22-Oct-19 |        310        0.14       26.43
  23-Oct-19 |        310        0.14       26.56
  24-Oct-19 |        310        0.14       26.70
  25-Oct-19 |        310        0.14       26.84
  26-Oct-19 |        310        0.14       26.98
  27-Oct-19 |        310        0.14       27.12
  28-Oct-19 |        310        0.14       27.26
  29-Oct-19 |        310        0.14       27.40
  30-Oct-19 |        310        0.14       27.54
  31-Oct-19 |        310        0.14       27.68
   1-Nov-19 |        310        0.14       27.82
   2-Nov-19 |        310        0.14       27.96
   3-Nov-19 |        310        0.14       28.09
   4-Nov-19 |        310        0.14       28.23
   5-Nov-19 |        310        0.14       28.37
   6-Nov-19 |        310        0.14       28.51
   7-Nov-19 |        310        0.14       28.65
   8-Nov-19 |        310        0.14       28.79
   9-Nov-19 |        310        0.14       28.93
  10-Nov-19 |        310        0.14       29.07
  11-Nov-19 |        310        0.14       29.21
  12-Nov-19 |        310        0.14       29.35
  13-Nov-19 |        310        0.14       29.49
  14-Nov-19 |        310        0.14       29.62
  15-Nov-19 |        310        0.14       29.76
  16-Nov-19 |        310        0.14       29.90
  17-Nov-19 |        310        0.14       30.04
  18-Nov-19 |        310        0.14       30.18
  19-Nov-19 |        310        0.14       30.32
  20-Nov-19 |        310        0.14       30.46
  21-Nov-19 |        310        0.14       30.60
  22-Nov-19 |        310        0.14       30.74
  23-Nov-19 |        310        0.14       30.88
  24-Nov-19 |        310        0.14       31.02
  25-Nov-19 |        310        0.14       31.15
  26-Nov-19 |        310        0.14       31.29
  27-Nov-19 |        310        0.14       31.43
  28-Nov-19 |        310        0.14       31.57
  29-Nov-19 |        310        0.14       31.71
  30-Nov-19 |        310        0.14       31.85
   1-Dec-19 |        310        0.14       31.99
   2-Dec-19 |        310        0.14       32.13
   3-Dec-19 |        310        0.14       32.27
   4-Dec-19 |        310        0.14       32.41
   5-Dec-19 |        310        0.14       32.55
   6-Dec-19 |        310        0.14       32.68
   7-Dec-19 |        310        0.14       32.82
   8-Dec-19 |        310        0.14       32.96
   9-Dec-19 |        310        0.14       33.10
  10-Dec-19 |        310        0.14       33.24
  11-Dec-19 |        310        0.14       33.38
  12-Dec-19 |        310        0.14       33.52
  13-Dec-19 |        310        0.14       33.66
  14-Dec-19 |        310        0.14       33.80
  15-Dec-19 |        310        0.14       33.94
  16-Dec-19 |        310        0.14       34.08
  17-Dec-19 |        310        0.14       34.21
  18-Dec-19 |        310        0.14       34.35
  19-Dec-19 |        310        0.14       34.49
  20-Dec-19 |        310        0.14       34.63
  21-Dec-19 |        310        0.14       34.77
  22-Dec-19 |        310        0.14       34.91
  23-Dec-19 |        310        0.14       35.05
  24-Dec-19 |        310        0.14       35.19
  25-Dec-19 |        310        0.14       35.33
  26-Dec-19 |        310        0.14       35.47
  27-Dec-19 |        310        0.14       35.61
  28-Dec-19 |        310        0.14       35.74
  29-Dec-19 |        310        0.14       35.88
  30-Dec-19 |        310        0.14       36.02
  31-Dec-19 |        310        0.14       36.16
   1-Jan-20 |        310        0.14       36.30
   2-Jan-20 |        310        0.14       36.44
   3-Jan-20 |        310        0.14       36.58
   4-Jan-20 |        310        0.14       36.72
   5-Jan-20 |        310        0.14       36.86
   6-Jan-20 |        310        0.14       37.00
   7-Jan-20 |        310        0.14       37.13
   8-Jan-20 |        310        0.14       37.27
   9-Jan-20 |        310        0.14       37.41
  10-Jan-20 |        310        0.14       37.55
  11-Jan-20 |        310        0.14       37.69
  12-Jan-20 |        310        0.14       37.83
  13-Jan-20 |        310        0.14       37.97
  14-Jan-20 |        310        0.14       38.11
  15-Jan-20 |        310        0.14       38.25
  16-Jan-20 |        310        0.14       38.39
  17-Jan-20 |        310        0.14       38.53
  18-Jan-20 |        310        0.14       38.66
  19-Jan-20 |        310        0.14       38.80
  20-Jan-20 |        310        0.14       38.94
  21-Jan-20 |        310        0.14       39.08
  22-Jan-20 |        310        0.14       39.22
  23-Jan-20 |        310        0.14       39.36
  24-Jan-20 |        310        0.14       39.50
  25-Jan-20 |        310        0.14       39.64
  26-Jan-20 |        310        0.14       39.78
  27-Jan-20 |        310        0.14       39.92
  28-Jan-20 |        310        0.14       40.06
  29-Jan-20 |        310        0.14       40.19
  30-Jan-20 |        310        0.14       40.33
  31-Jan-20 |        310        0.14       40.47
   1-Feb-20 |        310        0.14       40.61
   2-Feb-20 |        310        0.14       40.75
   3-Feb-20 |        310        0.14       40.89
   4-Feb-20 |        310        0.14       41.03
   5-Feb-20 |        310        0.14       41.17
   6-Feb-20 |        310        0.14       41.31
   7-Feb-20 |        310        0.14       41.45
   8-Feb-20 |        310        0.14       41.59
   9-Feb-20 |        310        0.14       41.72
  10-Feb-20 |        310        0.14       41.86
  11-Feb-20 |        310        0.14       42.00
  12-Feb-20 |        310        0.14       42.14
  13-Feb-20 |        310        0.14       42.28
  14-Feb-20 |        310        0.14       42.42
  15-Feb-20 |        310        0.14       42.56
  16-Feb-20 |        310        0.14       42.70
  17-Feb-20 |        310        0.14       42.84
  18-Feb-20 |        310        0.14       42.98
  19-Feb-20 |        310        0.14       43.12
  20-Feb-20 |        310        0.14       43.25
  21-Feb-20 |        310        0.14       43.39
  22-Feb-20 |        310        0.14       43.53
  23-Feb-20 |        310        0.14       43.67
  24-Feb-20 |        310        0.14       43.81
  25-Feb-20 |        310        0.14       43.95
  26-Feb-20 |        310        0.14       44.09
  27-Feb-20 |        310        0.14       44.23
  28-Feb-20 |        310        0.14       44.37
  29-Feb-20 |        310        0.14       44.51
   1-Mar-20 |        310        0.14       44.65
   2-Mar-20 |        310        0.14       44.78
   3-Mar-20 |        310        0.14       44.92
   4-Mar-20 |        310        0.14       45.06
   5-Mar-20 |        310        0.14       45.20
   6-Mar-20 |        310        0.14       45.34
   7-Mar-20 |        310        0.14       45.48
   8-Mar-20 |        310        0.14       45.62
   9-Mar-20 |        310        0.14       45.76
  10-Mar-20 |        310        0.14       45.90
  11-Mar-20 |        310        0.14       46.04
  12-Mar-20 |        310        0.14       46.18
  13-Mar-20 |        310        0.14       46.31
  14-Mar-20 |        310        0.14       46.45
  15-Mar-20 |        310        0.14       46.59
  16-Mar-20 |        310        0.14       46.73
  17-Mar-20 |        310        0.14       46.87
  18-Mar-20 |        310        0.14       47.01
  19-Mar-20 |        310        0.14       47.15
  20-Mar-20 |        310        0.14       47.29
  21-Mar-20 |        310        0.14       47.43
  22-Mar-20 |        310        0.14       47.57
  23-Mar-20 |        310        0.14       47.71
  24-Mar-20 |        310        0.14       47.84
  25-Mar-20 |        310        0.14       47.98
  26-Mar-20 |        310        0.14       48.12
  27-Mar-20 |        310        0.14       48.26
  28-Mar-20 |        310        0.14       48.40
  29-Mar-20 |        310        0.14       48.54
  30-Mar-20 |        310        0.14       48.68
  31-Mar-20 |        310        0.14       48.82
   1-Apr-20 |        310        0.14       48.96
   2-Apr-20 |        310        0.14       49.10
   3-Apr-20 |        310        0.14       49.24
   4-Apr-20 |        310        0.14       49.37
   5-Apr-20 |        310        0.14       49.51
   6-Apr-20 |        310        0.14       49.65
   7-Apr-20 |        310        0.14       49.79
   8-Apr-20 |        310        0.14       49.93
   9-Apr-20 |        310        0.14       50.07
  10-Apr-20 |        310        0.14       50.21
  11-Apr-20 |        310        0.14       50.35
  12-Apr-20 |        310        0.14       50.49
  13-Apr-20 |        310        0.14       50.63
  14-Apr-20 |        310        0.14       50.76
  15-Apr-20 |        310        0.14       50.90
  16-Apr-20 |        310        0.14       51.04
  17-Apr-20 |        310        0.14       51.18
  18-Apr-20 |        310        0.14       51.32
  19-Apr-20 |        310        0.14       51.46
  20-Apr-20 |        310        0.14       51.60
  21-Apr-20 |        310        0.14       51.74
  22-Apr-20 |        310        0.14       51.88
  23-Apr-20 |        310        0.14       52.02
  24-Apr-20 |        310        0.14       52.16
  25-Apr-20 |        310        0.14       52.29
  26-Apr-20 |        310        0.14       52.43
  27-Apr-20 |        310        0.14       52.57
  28-Apr-20 |        310        0.14       52.71
  29-Apr-20 |        310        0.14       52.85
  30-Apr-20 |        310        0.14       52.99
   1-May-20 |        310        0.14       53.13
   2-May-20 |        310        0.14       53.27
   3-May-20 |        310        0.14       53.41
   4-May-20 |        310        0.14       53.55
   5-May-20 |        310        0.14       53.69
   6-May-20 |        310        0.14       53.82
   7-May-20 |        310        0.14       53.96
   8-May-20 |        310        0.14       54.10
   9-May-20 |        310        0.14       54.24
  10-May-20 |        310        0.14       54.38
  11-May-20 |        310        0.14       54.52
  12-May-20 |        310        0.14       54.66
  13-May-20 |        310        0.14       54.80
  14-May-20 |        310        0.14       54.94
  15-May-20 |        310        0.14       55.08
  16-May-20 |        310        0.14       55.22
  17-May-20 |        310        0.14       55.35
  18-May-20 |        310        0.14       55.49
  19-May-20 |        310        0.14       55.63
  20-May-20 |        310        0.14       55.77
  21-May-20 |        310        0.14       55.91
  22-May-20 |        310        0.14       56.05
  23-May-20 |        310        0.14       56.19
  24-May-20 |        310        0.14       56.33
  25-May-20 |        310        0.14       56.47
  26-May-20 |        310        0.14       56.61
  27-May-20 |        310        0.14       56.75
  28-May-20 |        310        0.14       56.88
  29-May-20 |        310        0.14       57.02
  30-May-20 |        310        0.14       57.16
  31-May-20 |        310        0.14       57.30
   1-Jun-20 |        310        0.14       57.44
   2-Jun-20 |        310        0.14       57.58
   3-Jun-20 |        310        0.14       57.72
   4-Jun-20 |        310        0.14       57.86
   5-Jun-20 |        310        0.14       58.00
   6-Jun-20 |        310        0.14       58.14
   7-Jun-20 |        310        0.14       58.28
   8-Jun-20 |        310        0.14       58.41
   9-Jun-20 |        310        0.14       58.55
  10-Jun-20 |        310        0.14       58.69
  11-Jun-20 |        310        0.14       58.83
  12-Jun-20 |        310        0.14       58.97
  13-Jun-20 |        310        0.14       59.11
  14-Jun-20 |        310        0.14       59.25
  15-Jun-20 |        310        0.14       59.39
  16-Jun-20 |        310        0.14       59.53
  17-Jun-20 |        310        0.14       59.67
  18-Jun-20 |        310        0.14       59.81
  19-Jun-20 |        310        0.14       59.94
  20-Jun-20 |        310        0.14       60.08
  21-Jun-20 |        310        0.14       60.22
  22-Jun-20 |        310        0.14       60.36
  23-Jun-20 |        310        0.14       60.50
  24-Jun-20 |        310        0.14       60.64
  25-Jun-20 |        310        0.14       60.78
  26-Jun-20 |        310        0.14       60.92
  27-Jun-20 |        310        0.14       61.06
  28-Jun-20 |        310        0.14       61.20
  29-Jun-20 |        310        0.14       61.34
  30-Jun-20 |        310        0.14       61.47
   1-Jul-20 |        310        0.14       61.61
   2-Jul-20 |        310        0.14       61.75
   3-Jul-20 |        310        0.14       61.89
   4-Jul-20 |        310        0.14       62.03
   5-Jul-20 |        310        0.14       62.17
   6-Jul-20 |        310        0.14       62.31
   7-Jul-20 |        310        0.14       62.45
   8-Jul-20 |        310        0.14       62.59
   9-Jul-20 |        310        0.14       62.73
  10-Jul-20 |        310        0.14       62.87
  11-Jul-20 |        310        0.14       63.00
  12-Jul-20 |        310        0.14       63.14
  13-Jul-20 |        310        0.14       63.28
  14-Jul-20 |        310        0.14       63.42
  15-Jul-20 |        310        0.14       63.56
  16-Jul-20 |        310        0.14       63.70
  17-Jul-20 |        310        0.14       63.84
  18-Jul-20 |        310        0.14       63.98
  19-Jul-20 |        310        0.14       64.12
  20-Jul-20 |        310        0.14       64.26
  21-Jul-20 |        310        0.14       64.39
  22-Jul-20 |        310        0.14       64.53
  23-Jul-20 |        310        0.14       64.67
  24-Jul-20 |        310        0.14       64.81
  25-Jul-20 |        310        0.14       64.95
  26-Jul-20 |        310        0.14       65.09
  27-Jul-20 |        310        0.14       65.23
  28-Jul-20 |        310        0.14       65.37
  29-Jul-20 |        310        0.14       65.51
  30-Jul-20 |        310        0.14       65.65
  31-Jul-20 |        310        0.14       65.79
   1-Aug-20 |        310        0.14       65.92
   2-Aug-20 |        310        0.14       66.06
   3-Aug-20 |        310        0.14       66.20
   4-Aug-20 |        310        0.14       66.34
   5-Aug-20 |        310        0.14       66.48
   6-Aug-20 |        310        0.14       66.62
   7-Aug-20 |        310        0.14       66.76
   8-Aug-20 |        310        0.14       66.90
   9-Aug-20 |        310        0.14       67.04
  10-Aug-20 |        310        0.14       67.18
  11-Aug-20 |        310        0.14       67.32
  12-Aug-20 |        310        0.14       67.45
  13-Aug-20 |        310        0.14       67.59
  14-Aug-20 |        310        0.14       67.73
  15-Aug-20 |        310        0.14       67.87
  16-Aug-20 |        310        0.14       68.01
  17-Aug-20 |        310        0.14       68.15
  18-Aug-20 |        310        0.14       68.29
  19-Aug-20 |        310        0.14       68.43
  20-Aug-20 |        310        0.14       68.57
  21-Aug-20 |        310        0.14       68.71
  22-Aug-20 |        310        0.14       68.85
  23-Aug-20 |        310        0.14       68.98
  24-Aug-20 |        310        0.14       69.12
  25-Aug-20 |        310        0.14       69.26
  26-Aug-20 |        310        0.14       69.40
  27-Aug-20 |        310        0.14       69.54
  28-Aug-20 |        310        0.14       69.68
  29-Aug-20 |        310        0.14       69.82
  30-Aug-20 |        310        0.14       69.96
  31-Aug-20 |        310        0.14       70.10
   1-Sep-20 |        310        0.14       70.24
   2-Sep-20 |        310        0.14       70.38
   3-Sep-20 |        310        0.14       70.51
   4-Sep-20 |        310        0.14       70.65
   5-Sep-20 |        310        0.14       70.79
   6-Sep-20 |        310        0.14       70.93
   7-Sep-20 |        310        0.14       71.07
   8-Sep-20 |        310        0.14       71.21
   9-Sep-20 |        310        0.14       71.35
  10-Sep-20 |        310        0.14       71.49
  11-Sep-20 |        310        0.14       71.63
  12-Sep-20 |        310        0.14       71.77
  13-Sep-20 |        310        0.14       71.91
  14-Sep-20 |        310        0.14       72.04
  15-Sep-20 |        310        0.14       72.18
  16-Sep-20 |        310        0.14       72.32
  17-Sep-20 |        310        0.14       72.46
  18-Sep-20 |        310        0.14       72.60
  19-Sep-20 |        310        0.14       72.74
  20-Sep-20 |        310        0.14       72.88
  21-Sep-20 |        310        0.14       73.02
  22-Sep-20 |        310        0.14       73.16
  23-Sep-20 |        310        0.14       73.30
  24-Sep-20 |        310        0.14       73.44
  25-Sep-20 |        310        0.14       73.57
  26-Sep-20 |        310        0.14       73.71
  27-Sep-20 |        310        0.14       73.85
  28-Sep-20 |        310        0.14       73.99
  29-Sep-20 |        310        0.14       74.13
  30-Sep-20 |        310        0.14       74.27
   1-Oct-20 |        310        0.14       74.41
   2-Oct-20 |        310        0.14       74.55
   3-Oct-20 |        310        0.14       74.69
   4-Oct-20 |        310        0.14       74.83
   5-Oct-20 |        310        0.14       74.97
   6-Oct-20 |        310        0.14       75.10
   7-Oct-20 |        310        0.14       75.24
   8-Oct-20 |        310        0.14       75.38
   9-Oct-20 |        310        0.14       75.52
  10-Oct-20 |        310        0.14       75.66
  11-Oct-20 |        310        0.14       75.80
  12-Oct-20 |        310        0.14       75.94
  13-Oct-20 |        310        0.14       76.08
  14-Oct-20 |        310        0.14       76.22
  15-Oct-20 |        310        0.14       76.36
  16-Oct-20 |        310        0.14       76.50
  17-Oct-20 |        310        0.14       76.63
  18-Oct-20 |        310        0.14       76.77
  19-Oct-20 |        310        0.14       76.91
  20-Oct-20 |        310        0.14       77.05
  21-Oct-20 |        310        0.14       77.19
  22-Oct-20 |        310        0.14       77.33
  23-Oct-20 |        310        0.14       77.47
  24-Oct-20 |        310        0.14       77.61
  25-Oct-20 |        310        0.14       77.75
  26-Oct-20 |        310        0.14       77.89
  27-Oct-20 |        310        0.14       78.03
  28-Oct-20 |        310        0.14       78.16
  29-Oct-20 |        310        0.14       78.30
  30-Oct-20 |        310        0.14       78.44
  31-Oct-20 |        310        0.14       78.58
   1-Nov-20 |        310        0.14       78.72
   2-Nov-20 |        310        0.14       78.86
   3-Nov-20 |        310        0.14       79.00
   4-Nov-20 |        310        0.14       79.14
   5-Nov-20 |        310        0.14       79.28
   6-Nov-20 |        310        0.14       79.42
   7-Nov-20 |        310        0.14       79.55
   8-Nov-20 |        310        0.14       79.69
   9-Nov-20 |        310        0.14       79.83
  10-Nov-20 |        310        0.14       79.97
  11-Nov-20 |        310        0.14       80.11
  12-Nov-20 |        310        0.14       80.25
  13-Nov-20 |        310        0.14       80.39
  14-Nov-20 |        310        0.14       80.53
  15-Nov-20 |        310        0.14       80.67
  16-Nov-20 |        310        0.14       80.81
  17-Nov-20 |        310        0.14       80.95
  18-Nov-20 |        310        0.14       81.08
  19-Nov-20 |        310        0.14       81.22
  20-Nov-20 |        310        0.14       81.36
  21-Nov-20 |        310        0.14       81.50
  22-Nov-20 |        310        0.14       81.64
  23-Nov-20 |        310        0.14       81.78
  24-Nov-20 |        310        0.14       81.92
  25-Nov-20 |        310        0.14       82.06
  26-Nov-20 |        310        0.14       82.20
  27-Nov-20 |        310        0.14       82.34
  28-Nov-20 |        310        0.14       82.48
  29-Nov-20 |        310        0.14       82.61
  30-Nov-20 |        310        0.14       82.75
   1-Dec-20 |        310        0.14       82.89
   2-Dec-20 |        310        0.14       83.03
   3-Dec-20 |        310        0.14       83.17
   4-Dec-20 |        310        0.14       83.31
   5-Dec-20 |        310        0.14       83.45
   6-Dec-20 |        310        0.14       83.59
   7-Dec-20 |        310        0.14       83.73
   8-Dec-20 |        310        0.14       83.87
   9-Dec-20 |        310        0.14       84.01
  10-Dec-20 |        310        0.14       84.14
  11-Dec-20 |        310        0.14       84.28
  12-Dec-20 |        310        0.14       84.42
  13-Dec-20 |        310        0.14       84.56
  14-Dec-20 |        310        0.14       84.70
  15-Dec-20 |        310        0.14       84.84
  16-Dec-20 |        310        0.14       84.98
  17-Dec-20 |        310        0.14       85.12
  18-Dec-20 |        310        0.14       85.26
  19-Dec-20 |        310        0.14       85.40
  20-Dec-20 |        310        0.14       85.54
  21-Dec-20 |        310        0.14       85.67
  22-Dec-20 |        310        0.14       85.81
  23-Dec-20 |        310        0.14       85.95
  24-Dec-20 |        310        0.14       86.09
  25-Dec-20 |        310        0.14       86.23
  26-Dec-20 |        310        0.14       86.37
  27-Dec-20 |        310        0.14       86.51
  28-Dec-20 |        310        0.14       86.65
  29-Dec-20 |        310        0.14       86.79
  30-Dec-20 |        310        0.14       86.93
  31-Dec-20 |        310        0.14       87.07
   1-Jan-21 |        310        0.14       87.20
   2-Jan-21 |        310        0.14       87.34
   3-Jan-21 |        310        0.14       87.48
   4-Jan-21 |        310        0.14       87.62
   5-Jan-21 |        310        0.14       87.76
   6-Jan-21 |        310        0.14       87.90
   7-Jan-21 |        310        0.14       88.04
   8-Jan-21 |        310        0.14       88.18
   9-Jan-21 |        310        0.14       88.32
  10-Jan-21 |        310        0.14       88.46
  11-Jan-21 |        310        0.14       88.60
  12-Jan-21 |        310        0.14       88.73
  13-Jan-21 |        310        0.14       88.87
  14-Jan-21 |        310        0.14       89.01
  15-Jan-21 |        310        0.14       89.15
  16-Jan-21 |        310        0.14       89.29
  17-Jan-21 |        310        0.14       89.43
  18-Jan-21 |        310        0.14       89.57
  19-Jan-21 |        310        0.14       89.71
  20-Jan-21 |        310        0.14       89.85
  21-Jan-21 |        310        0.14       89.99
  22-Jan-21 |        310        0.14       90.13
  23-Jan-21 |        310        0.14       90.26
  24-Jan-21 |        310        0.14       90.40
  25-Jan-21 |        310        0.14       90.54
  26-Jan-21 |        310        0.14       90.68
  27-Jan-21 |        310        0.14       90.82
  28-Jan-21 |        310        0.14       90.96
  29-Jan-21 |        310        0.14       91.10
  30-Jan-21 |        310        0.14       91.24
  31-Jan-21 |        310        0.14       91.38
   1-Feb-21 |        310        0.14       91.52
   2-Feb-21 |        310        0.14       91.66
   3-Feb-21 |        310        0.14       91.79
   4-Feb-21 |        310        0.14       91.93
   5-Feb-21 |        310        0.14       92.07
   6-Feb-21 |        310        0.14       92.21
   7-Feb-21 |        310        0.14       92.35
   8-Feb-21 |        310        0.14       92.49
   9-Feb-21 |        310        0.14       92.63
  10-Feb-21 |        310        0.14       92.77
  11-Feb-21 |        310        0.14       92.91
  12-Feb-21 |        310        0.14       93.05
  13-Feb-21 |        310        0.14       93.18
  14-Feb-21 |        310        0.14       93.32
  15-Feb-21 |        310        0.14       93.46
  16-Feb-21 |        310        0.14       93.60
  17-Feb-21 |        310        0.14       93.74
  18-Feb-21 |        310        0.14       93.88
  19-Feb-21 |        310        0.14       94.02
  20-Feb-21 |        310        0.14       94.16
  21-Feb-21 |        310        0.14       94.30
  22-Feb-21 |        310        0.14       94.44
  23-Feb-21 |        310        0.14       94.58
  24-Feb-21 |        310        0.14       94.71
  25-Feb-21 |        310        0.14       94.85
  26-Feb-21 |        310        0.14       94.99
  27-Feb-21 |        310        0.14       95.13
  28-Feb-21 |        310        0.14       95.27
   1-Mar-21 |        310        0.14       95.41
   2-Mar-21 |        310        0.14       95.55
   3-Mar-21 |        310        0.14       95.69
   4-Mar-21 |        310        0.14       95.83
   5-Mar-21 |        310        0.14       95.97
   6-Mar-21 |        310        0.14       96.11
   7-Mar-21 |        310        0.14       96.24
   8-Mar-21 |        310        0.14       96.38
   9-Mar-21 |        310        0.14       96.52
  10-Mar-21 |        310        0.14       96.66
  11-Mar-21 |        310        0.14       96.80
  12-Mar-21 |        310        0.14       96.94
  13-Mar-21 |        310        0.14       97.08
  14-Mar-21 |        310        0.14       97.22
  15-Mar-21 |        310        0.14       97.36
  16-Mar-21 |        310        0.14       97.50
  17-Mar-21 |        310        0.14       97.64
  18-Mar-21 |        310        0.14       97.77
  19-Mar-21 |        310        0.14       97.91
  20-Mar-21 |        310        0.14       98.05
  21-Mar-21 |        310        0.14       98.19
  22-Mar-21 |        310        0.14       98.33
  23-Mar-21 |        310        0.14       98.47
  24-Mar-21 |        310        0.14       98.61
  25-Mar-21 |        310        0.14       98.75
  26-Mar-21 |        310        0.14       98.89
  27-Mar-21 |        310        0.14       99.03
  28-Mar-21 |        310        0.14       99.17
  29-Mar-21 |        310        0.14       99.30
  30-Mar-21 |        310        0.14       99.44
  31-Mar-21 |        310        0.14       99.58
   1-Apr-21 |        310        0.14       99.72
   2-Apr-21 |        310        0.14       99.86
   3-Apr-21 |        310        0.14      100.00
------------+-----------------------------------
      Total |    222,890      100.00

. ** 222,890 Observations. 310 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. gen period = 0

. ** Mock-I
. replace period = 1 if date >= td(15jul2019) 
(194,990 real changes made)

. ** Mock-II
. replace period = 2 if date >= td(13aug2019)
(186,000 real changes made)

. ** Comp-I
. replace period = 3 if date >= td(16sep2019)
(175,460 real changes made)

. ** Comp-II
. replace period = 4 if date >= td(16oct2019)
(166,160 real changes made)

. ** Comp-III
. replace period = 5 if date >= td(16nov2019)
(156,550 real changes made)

. ** Comp-IV
. replace period = 6 if date >= td(01jan2020)
(142,290 real changes made)

. ** Comp-V
. replace period = 7 if date >= td(01feb2020)
(132,680 real changes made)

. ** Comp-VI
. replace period = 8 if date >= td(01mar2020)
(123,690 real changes made)

. ** Interregnum-I
. replace period = 9 if date >= td(22mar2020)
(117,180 real changes made)

. ** Mock-III
. replace period = 10 if date >= td(12oct2020)
(53,940 real changes made)

. ** Interregnum-II
. replace period = 11 if date >= td(12nov2020)
(44,330 real changes made)

. ** Comp-VII
. replace period = 12 if date >= td(01dec2020)
(38,440 real changes made)

. ** Comp-VIII
. replace period = 13 if date >= td(01jan2021)
(28,830 real changes made)

. ** Comp-IX
. replace period = 14 if date >= td(01feb2021)
(19,220 real changes made)

. ** Comp-X
. replace period = 15 if date >= td(01mar2021)
(10,540 real changes made)

. 
. drop if date >=  td(01apr2021)
(930 observations deleted)

. 
. *tab period if composite_id == "GJSRT100740111"
. gen temp = 1

. bysort period: egen period_length = sum(temp) 

. replace period_length = period_length / 310 
(221,960 real changes made)

. drop temp

. 
. ********************************************************************************
. ********************* [1] CALCULATE ACTUAL STACK DAY MASS **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Replace tot_report_hrs to zero 
.         ** if the stack was not sending a valid caliberated stack-day kg/hr that day
.         gen tot_report_hrs_rule`i' = tot_report_hrs
  3.         replace tot_report_hrs_rule`i' = 0 if D_vctransmitting_rule`i' == 0
  4.         label var tot_report_hrs_rule`i' ///
>                 "[RE-LABELED] Stack-day VALID CALIBRATED Reporting Hours from CEMS - rule `i'"
  5. 
.         ** Calculate DAILY actual mass emissions using CEMA Day Reporting Hours
.         gen stack_daily_mass_actual_rule`i' = pm_mass_rule`i' * tot_report_hrs_rule`i'
  6.         la var stack_daily_mass_actual_rule`i' ///
>                 "Stack Day Actual Mass Emissions (kg) from CEMS Reported Hours - rule `i'"
  7. 
. }
(13,799 real changes made)
(92,287 missing values generated)
(13,140 real changes made)
(91,628 missing values generated)
(51,614 real changes made)
(130,102 missing values generated)
(51,140 real changes made)
(129,628 missing values generated)
(71,887 real changes made)
(150,375 missing values generated)
(71,520 real changes made)
(150,008 missing values generated)
(60,805 real changes made)
(139,293 missing values generated)
(60,375 real changes made)
(138,863 missing values generated)
(30,192 real changes made)
(108,680 missing values generated)
(29,607 real changes made)
(108,095 missing values generated)

. 
. ********************************************************************************
. ***************** [2] DAILY NON-REPORTING HOURS FOR IMPUTATION *****************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate DAILY non-reporting hours for imputation
.         gen daily_nonreport_hrs_rule`i' = 24 - tot_report_hrs_rule`i'
  3.         order daily_nonreport_hrs_rule`i', a(tot_report_hrs_rule`i')
  4.         la var daily_nonreport_hrs_rule`i' ///
>                 "Stack Day NON-Reporting Hours - CEMS - rule `i'"
  5. 
. }

. 
. ********************************************************************************
. ********* [3] For Imp: GENERATE STACK'S OWN WEEK and MONTH MEAN KG/HR **********
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate stack's own week mean kg/hr for missing pm mass values
.         bysort composite_id week: egen week_mean_mass_rule`i' = mean(pm_mass_rule`i')
  3.         label var week_mean_mass_rule`i' "Stack Week Mean kg/hr - rule `i'"
  4. 
.         ** Calculate stack's own month mean kg/hr for stacks missing entire week of pm mass
.         bysort composite_id period: egen period_mean_mass_rule`i' = mean(pm_mass_rule`i')
  5.         label var period_mean_mass_rule`i' "Stack Period Mean kg/hr - rule `i'"
  6. 
. }
(77,577 missing values generated)
(37,348 missing values generated)
(77,038 missing values generated)
(37,167 missing values generated)
(119,197 missing values generated)
(93,240 missing values generated)
(118,820 missing values generated)
(93,211 missing values generated)
(141,323 missing values generated)
(120,953 missing values generated)
(141,099 missing values generated)
(120,953 missing values generated)
(129,488 missing values generated)
(105,869 missing values generated)
(129,167 missing values generated)
(105,840 missing values generated)
(95,938 missing values generated)
(64,266 missing values generated)
(95,484 missing values generated)
(64,147 missing values generated)

. 
. /*******************************************************************************
>            NOW READY FOR IMPUTATION RULE 0a.
>            THE IMPLEMENTATION OF THIS RULE WILL BE:
> 
>            1)   IMPUTE STACK'S OWN WEEK MEAN PM_MASS (KG/HR) FOR ALL MISSING VALUES
>            OF STACK DAY PM_MASS (KG/HR). 
>            2)   IF WEEK MEAN KG/HR IS MISSING, IMPUTE MONTH MEAN PM_MASS (KG/HR)
>            3)   THE FINAL EMISSION QUANTITY IS:
> 
>            VALIDATED STACK MASS (KG) = 
>            ACTUAL STACK MASS (KG) USING CEMS REPORTED HOURS +
>            IMPUTED STACK MASS (KG) USING CEMS NON-REPORTED HOURS
>    ****************************************************************************/
. 
. 
. 
. ********************************************************************************
. ******************** [4] CALCULATE DAILY STACK IMPUTED MASS ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate PER DAY imputed emissions
.         gen stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * week_mean_mass_rule`i'
  3.         replace stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * period_mean_mass_rule`i' ///
>                 if week_mean_mass_rule`i' == .
  4.         la var stack_daily_mass_imp_rule`i' ///
>                 "Stack-day Imputed Mass Emissions (kg) from CEMS Non-Reported Hours - rule`i'"
  5. 
.         ** Correct for week of Diwali 2019 when imputation should be zero.
.         replace stack_daily_mass_imp_rule`i' = 0 if ///
>                 date >= date("2019oct26", "YMD") & ///
>                 date <= date("2019nov03", "YMD") & ///
>                 stack_daily_mass_imp_rule`i' != .
  6. 
. }
(77,577 missing values generated)
(40,303 real changes made)
(1,449 real changes made)
(77,038 missing values generated)
(39,939 real changes made)
(1,446 real changes made)
(119,197 missing values generated)
(26,004 real changes made)
(987 real changes made)
(118,820 missing values generated)
(25,656 real changes made)
(982 real changes made)
(141,323 missing values generated)
(20,406 real changes made)
(805 real changes made)
(141,099 missing values generated)
(20,182 real changes made)
(800 real changes made)
(129,488 missing values generated)
(23,664 real changes made)
(904 real changes made)
(129,167 missing values generated)
(23,372 real changes made)
(899 real changes made)
(95,938 missing values generated)
(31,730 real changes made)
(1,264 real changes made)
(95,484 missing values generated)
(31,389 real changes made)
(1,253 real changes made)

. 
. ********************************************************************************
. ******************* [5] CALCULATE DAILY STACK VALIDATED MASS *******************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate validated DAY emissions per stack
.         gen stack_daily_mass_val_rule`i' = stack_daily_mass_actual_rule`i' + stack_daily_mass_imp_rule`i'
  3.         replace stack_daily_mass_val_rule`i' = stack_daily_mass_imp_rule`i' ///
>                 if stack_daily_mass_val_rule`i' == .
  4.         la var stack_daily_mass_val_rule`i' ///
>                 "Stack Day Validated Mass Emissions (kg) (=Stack-day Actual + Stack-day Imp) - rule `i'"
  5. 
. }
(92,287 missing values generated)
(55,013 real changes made)
note: label truncated to 80 characters
(91,628 missing values generated)
(54,529 real changes made)
note: label truncated to 80 characters
(130,102 missing values generated)
(36,909 real changes made)
note: label truncated to 80 characters
(129,628 missing values generated)
(36,464 real changes made)
note: label truncated to 80 characters
(150,375 missing values generated)
(29,458 real changes made)
note: label truncated to 80 characters
(150,008 missing values generated)
(29,091 real changes made)
note: label truncated to 80 characters
(139,293 missing values generated)
(33,469 real changes made)
note: label truncated to 80 characters
(138,863 missing values generated)
(33,068 real changes made)
note: label truncated to 80 characters
(108,680 missing values generated)
(44,472 real changes made)
note: label truncated to 80 characters
(108,095 missing values generated)
(44,000 real changes made)
note: label truncated to 80 characters

. *pause
. /*******************************************************************************
>            NOW READY TO MAKE THE DEPENDENT VARIABLE FOR REGRESSIONS IN PART 6 
>            (6. TREATMENT EFFECT ANALYSIS). THIS VAR IS PLANT MONTH MASS (KG).
> 
>            STEPS TO CREATE THIS VARIABLE WILL BE:
> 
>            6.1) CALCULATE STACK WEEK MASS (KG), AND THEN PLANT WEEK MASS (KG).
>            FIRST GENERATE THESE VARIABLES IN THE STACK-DAY LEVEL DATA SET.
>            AND SAVE IT FOR FUTURE USE IF NEEDED ("_StackDayLevel.dta").
> 
>            6.2) THEN, COLLAPSE THE STACK-DAY LEVEL DATA SET TO KEEP ONE DATA POINT 
>            PER PLANT PER WEEK ("_PlantWeekLevel.dta"). 
> 
>            CONTAINS THE DEPENDENT VARIABLE: PLANT-WEEK MASS (KG) EMISSIONS 
>            USING IMPUTATION RULE 0a.
>    ****************************************************************************/
. 
. preserve

. 
. ********************************************************************************
. ******************** [6.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. /**     AS PER NICK'S INSTRUCTION ON WEEKLY CALL 01 DEC 2020: FOR PLANTS WITH >1 STACK, 
>            WE WILL ONLY CALCULATE THEIR PLANT MASS (KG) SUM IF ALL STACKS ARE CONNECTED. 
>            IF STACKS ARE PARTIALLY CONNECTED (i.e., ONLY 1 OF 3 STACKS CONNECTED), 
>    THE ENTIRE PLANT SUM WILL BE MISSING.        **/
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate Daily validated emissions PER PLANT
.         bysort gpcb_id date: egen ind_day_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort gpcb_id date: egen miss_ind_day_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace ind_day_mass_val_rule`i' = . if miss_ind_day_mass_val == 1
  5.         la var ind_day_mass_val_rule`i' ///
>                 "Plant-day Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_day_mass_val
  7. 
. }
(39,330 real changes made, 39,330 to missing)
(39,155 real changes made, 39,155 to missing)
(94,613 real changes made, 94,613 to missing)
(94,584 real changes made, 94,584 to missing)
(122,306 real changes made, 122,306 to missing)
(122,306 real changes made, 122,306 to missing)
(106,980 real changes made, 106,980 to missing)
(106,951 real changes made, 106,951 to missing)
(65,812 real changes made, 65,812 to missing)
(65,699 real changes made, 65,699 to missing)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id date: gen dump=_n

. bysort gpcb_id date: keep if _n==_N
(12,888 observations deleted)

. keep gpcb_id date treatmentstatus ind_day_mass_val_rule0

. ** 4,672 observations. 292 plants. 16 periods.
. 
. save "$IMPUTATION_DATA_OUT/PlantDayPMMassRuleA.dta", replace
(file 02DataPipeline/emissions/imputation/PlantDayPMMassRuleA.dta not found)
file 02DataPipeline/emissions/imputation/PlantDayPMMassRuleA.dta saved

. 
. restore

. 
end of do-file

. do "$CODE_DIR/imputation/3a. Create PM Mass (Stack-Month, Plant-Month).do"

. /*******************************************************************************
>            Project: ETS
>            Purpose: Create the dependent variable for regression, PLANT-MONTH KG 
>            EMISSIONS (KG/MONTH), using IMPUTATION RULE 0: WITHIN-STACK 
>            MEAN MONTH KG/HR.
> 
>            Note: IMPUTATION RULE 0 is executed as follows:
> 
>            1) Missing values of Stack day kg/hr are imputed with the stack's 
>            own week mean kg/hr.
> 
>            2) If no week mean kg/hr (i.e., stack is missing entire week 
>            of stack-day observations, or is not CEMS-connected), all remaining 
>            missing values of Stack day kg/hr are imputed with the stack's own 
>            month mean kg/hr
>    ****************************************************************************/
. 
. set more off

. clear all

. pause on

. 
. *-------------------------------------------------------------------------------
. 
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. drop if date < date("2019jan16", "YMD")
(0 observations deleted)

. format date %tddd-Mon-YY

. sort date composite_id

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        337        0.14        0.14
  17-Apr-19 |        337        0.14        0.28
  18-Apr-19 |        337        0.14        0.42
  19-Apr-19 |        337        0.14        0.56
  20-Apr-19 |        337        0.14        0.70
  21-Apr-19 |        337        0.14        0.83
  22-Apr-19 |        337        0.14        0.97
  23-Apr-19 |        337        0.14        1.11
  24-Apr-19 |        337        0.14        1.25
  25-Apr-19 |        337        0.14        1.39
  26-Apr-19 |        337        0.14        1.53
  27-Apr-19 |        337        0.14        1.67
  28-Apr-19 |        337        0.14        1.81
  29-Apr-19 |        337        0.14        1.95
  30-Apr-19 |        337        0.14        2.09
   1-May-19 |        337        0.14        2.23
   2-May-19 |        337        0.14        2.36
   3-May-19 |        337        0.14        2.50
   4-May-19 |        337        0.14        2.64
   5-May-19 |        337        0.14        2.78
   6-May-19 |        337        0.14        2.92
   7-May-19 |        337        0.14        3.06
   8-May-19 |        337        0.14        3.20
   9-May-19 |        337        0.14        3.34
  10-May-19 |        337        0.14        3.48
  11-May-19 |        337        0.14        3.62
  12-May-19 |        337        0.14        3.76
  13-May-19 |        337        0.14        3.89
  14-May-19 |        337        0.14        4.03
  15-May-19 |        337        0.14        4.17
  16-May-19 |        337        0.14        4.31
  17-May-19 |        337        0.14        4.45
  18-May-19 |        337        0.14        4.59
  19-May-19 |        337        0.14        4.73
  20-May-19 |        337        0.14        4.87
  21-May-19 |        337        0.14        5.01
  22-May-19 |        337        0.14        5.15
  23-May-19 |        337        0.14        5.29
  24-May-19 |        337        0.14        5.42
  25-May-19 |        337        0.14        5.56
  26-May-19 |        337        0.14        5.70
  27-May-19 |        337        0.14        5.84
  28-May-19 |        337        0.14        5.98
  29-May-19 |        337        0.14        6.12
  30-May-19 |        337        0.14        6.26
  31-May-19 |        337        0.14        6.40
   1-Jun-19 |        337        0.14        6.54
   2-Jun-19 |        337        0.14        6.68
   3-Jun-19 |        337        0.14        6.82
   4-Jun-19 |        337        0.14        6.95
   5-Jun-19 |        337        0.14        7.09
   6-Jun-19 |        337        0.14        7.23
   7-Jun-19 |        337        0.14        7.37
   8-Jun-19 |        337        0.14        7.51
   9-Jun-19 |        337        0.14        7.65
  10-Jun-19 |        337        0.14        7.79
  11-Jun-19 |        337        0.14        7.93
  12-Jun-19 |        337        0.14        8.07
  13-Jun-19 |        337        0.14        8.21
  14-Jun-19 |        337        0.14        8.34
  15-Jun-19 |        337        0.14        8.48
  16-Jun-19 |        337        0.14        8.62
  17-Jun-19 |        337        0.14        8.76
  18-Jun-19 |        337        0.14        8.90
  19-Jun-19 |        337        0.14        9.04
  20-Jun-19 |        337        0.14        9.18
  21-Jun-19 |        337        0.14        9.32
  22-Jun-19 |        337        0.14        9.46
  23-Jun-19 |        337        0.14        9.60
  24-Jun-19 |        337        0.14        9.74
  25-Jun-19 |        337        0.14        9.87
  26-Jun-19 |        337        0.14       10.01
  27-Jun-19 |        337        0.14       10.15
  28-Jun-19 |        337        0.14       10.29
  29-Jun-19 |        337        0.14       10.43
  30-Jun-19 |        337        0.14       10.57
   1-Jul-19 |        337        0.14       10.71
   2-Jul-19 |        337        0.14       10.85
   3-Jul-19 |        337        0.14       10.99
   4-Jul-19 |        337        0.14       11.13
   5-Jul-19 |        337        0.14       11.27
   6-Jul-19 |        337        0.14       11.40
   7-Jul-19 |        337        0.14       11.54
   8-Jul-19 |        337        0.14       11.68
   9-Jul-19 |        337        0.14       11.82
  10-Jul-19 |        337        0.14       11.96
  11-Jul-19 |        337        0.14       12.10
  12-Jul-19 |        337        0.14       12.24
  13-Jul-19 |        337        0.14       12.38
  14-Jul-19 |        337        0.14       12.52
  15-Jul-19 |        337        0.14       12.66
  16-Jul-19 |        337        0.14       12.80
  17-Jul-19 |        337        0.14       12.93
  18-Jul-19 |        337        0.14       13.07
  19-Jul-19 |        337        0.14       13.21
  20-Jul-19 |        337        0.14       13.35
  21-Jul-19 |        337        0.14       13.49
  22-Jul-19 |        337        0.14       13.63
  23-Jul-19 |        337        0.14       13.77
  24-Jul-19 |        337        0.14       13.91
  25-Jul-19 |        337        0.14       14.05
  26-Jul-19 |        337        0.14       14.19
  27-Jul-19 |        337        0.14       14.33
  28-Jul-19 |        337        0.14       14.46
  29-Jul-19 |        337        0.14       14.60
  30-Jul-19 |        337        0.14       14.74
  31-Jul-19 |        337        0.14       14.88
   1-Aug-19 |        337        0.14       15.02
   2-Aug-19 |        337        0.14       15.16
   3-Aug-19 |        337        0.14       15.30
   4-Aug-19 |        337        0.14       15.44
   5-Aug-19 |        337        0.14       15.58
   6-Aug-19 |        337        0.14       15.72
   7-Aug-19 |        337        0.14       15.86
   8-Aug-19 |        337        0.14       15.99
   9-Aug-19 |        337        0.14       16.13
  10-Aug-19 |        337        0.14       16.27
  11-Aug-19 |        337        0.14       16.41
  12-Aug-19 |        337        0.14       16.55
  13-Aug-19 |        337        0.14       16.69
  14-Aug-19 |        337        0.14       16.83
  15-Aug-19 |        337        0.14       16.97
  16-Aug-19 |        337        0.14       17.11
  17-Aug-19 |        337        0.14       17.25
  18-Aug-19 |        337        0.14       17.39
  19-Aug-19 |        337        0.14       17.52
  20-Aug-19 |        337        0.14       17.66
  21-Aug-19 |        337        0.14       17.80
  22-Aug-19 |        337        0.14       17.94
  23-Aug-19 |        337        0.14       18.08
  24-Aug-19 |        337        0.14       18.22
  25-Aug-19 |        337        0.14       18.36
  26-Aug-19 |        337        0.14       18.50
  27-Aug-19 |        337        0.14       18.64
  28-Aug-19 |        337        0.14       18.78
  29-Aug-19 |        337        0.14       18.92
  30-Aug-19 |        337        0.14       19.05
  31-Aug-19 |        337        0.14       19.19
   1-Sep-19 |        337        0.14       19.33
   2-Sep-19 |        337        0.14       19.47
   3-Sep-19 |        337        0.14       19.61
   4-Sep-19 |        337        0.14       19.75
   5-Sep-19 |        337        0.14       19.89
   6-Sep-19 |        337        0.14       20.03
   7-Sep-19 |        337        0.14       20.17
   8-Sep-19 |        337        0.14       20.31
   9-Sep-19 |        337        0.14       20.45
  10-Sep-19 |        337        0.14       20.58
  11-Sep-19 |        337        0.14       20.72
  12-Sep-19 |        337        0.14       20.86
  13-Sep-19 |        337        0.14       21.00
  14-Sep-19 |        337        0.14       21.14
  15-Sep-19 |        337        0.14       21.28
  16-Sep-19 |        337        0.14       21.42
  17-Sep-19 |        337        0.14       21.56
  18-Sep-19 |        337        0.14       21.70
  19-Sep-19 |        337        0.14       21.84
  20-Sep-19 |        337        0.14       21.97
  21-Sep-19 |        337        0.14       22.11
  22-Sep-19 |        337        0.14       22.25
  23-Sep-19 |        337        0.14       22.39
  24-Sep-19 |        337        0.14       22.53
  25-Sep-19 |        337        0.14       22.67
  26-Sep-19 |        337        0.14       22.81
  27-Sep-19 |        337        0.14       22.95
  28-Sep-19 |        337        0.14       23.09
  29-Sep-19 |        337        0.14       23.23
  30-Sep-19 |        337        0.14       23.37
   1-Oct-19 |        337        0.14       23.50
   2-Oct-19 |        337        0.14       23.64
   3-Oct-19 |        337        0.14       23.78
   4-Oct-19 |        337        0.14       23.92
   5-Oct-19 |        337        0.14       24.06
   6-Oct-19 |        337        0.14       24.20
   7-Oct-19 |        337        0.14       24.34
   8-Oct-19 |        337        0.14       24.48
   9-Oct-19 |        337        0.14       24.62
  10-Oct-19 |        337        0.14       24.76
  11-Oct-19 |        337        0.14       24.90
  12-Oct-19 |        337        0.14       25.03
  13-Oct-19 |        337        0.14       25.17
  14-Oct-19 |        337        0.14       25.31
  15-Oct-19 |        337        0.14       25.45
  16-Oct-19 |        337        0.14       25.59
  17-Oct-19 |        337        0.14       25.73
  18-Oct-19 |        337        0.14       25.87
  19-Oct-19 |        337        0.14       26.01
  20-Oct-19 |        337        0.14       26.15
  21-Oct-19 |        337        0.14       26.29
  22-Oct-19 |        337        0.14       26.43
  23-Oct-19 |        337        0.14       26.56
  24-Oct-19 |        337        0.14       26.70
  25-Oct-19 |        337        0.14       26.84
  26-Oct-19 |        337        0.14       26.98
  27-Oct-19 |        337        0.14       27.12
  28-Oct-19 |        337        0.14       27.26
  29-Oct-19 |        337        0.14       27.40
  30-Oct-19 |        337        0.14       27.54
  31-Oct-19 |        337        0.14       27.68
   1-Nov-19 |        337        0.14       27.82
   2-Nov-19 |        337        0.14       27.96
   3-Nov-19 |        337        0.14       28.09
   4-Nov-19 |        337        0.14       28.23
   5-Nov-19 |        337        0.14       28.37
   6-Nov-19 |        337        0.14       28.51
   7-Nov-19 |        337        0.14       28.65
   8-Nov-19 |        337        0.14       28.79
   9-Nov-19 |        337        0.14       28.93
  10-Nov-19 |        337        0.14       29.07
  11-Nov-19 |        337        0.14       29.21
  12-Nov-19 |        337        0.14       29.35
  13-Nov-19 |        337        0.14       29.49
  14-Nov-19 |        337        0.14       29.62
  15-Nov-19 |        337        0.14       29.76
  16-Nov-19 |        337        0.14       29.90
  17-Nov-19 |        337        0.14       30.04
  18-Nov-19 |        337        0.14       30.18
  19-Nov-19 |        337        0.14       30.32
  20-Nov-19 |        337        0.14       30.46
  21-Nov-19 |        337        0.14       30.60
  22-Nov-19 |        337        0.14       30.74
  23-Nov-19 |        337        0.14       30.88
  24-Nov-19 |        337        0.14       31.02
  25-Nov-19 |        337        0.14       31.15
  26-Nov-19 |        337        0.14       31.29
  27-Nov-19 |        337        0.14       31.43
  28-Nov-19 |        337        0.14       31.57
  29-Nov-19 |        337        0.14       31.71
  30-Nov-19 |        337        0.14       31.85
   1-Dec-19 |        337        0.14       31.99
   2-Dec-19 |        337        0.14       32.13
   3-Dec-19 |        337        0.14       32.27
   4-Dec-19 |        337        0.14       32.41
   5-Dec-19 |        337        0.14       32.55
   6-Dec-19 |        337        0.14       32.68
   7-Dec-19 |        337        0.14       32.82
   8-Dec-19 |        337        0.14       32.96
   9-Dec-19 |        337        0.14       33.10
  10-Dec-19 |        337        0.14       33.24
  11-Dec-19 |        337        0.14       33.38
  12-Dec-19 |        337        0.14       33.52
  13-Dec-19 |        337        0.14       33.66
  14-Dec-19 |        337        0.14       33.80
  15-Dec-19 |        337        0.14       33.94
  16-Dec-19 |        337        0.14       34.08
  17-Dec-19 |        337        0.14       34.21
  18-Dec-19 |        337        0.14       34.35
  19-Dec-19 |        337        0.14       34.49
  20-Dec-19 |        337        0.14       34.63
  21-Dec-19 |        337        0.14       34.77
  22-Dec-19 |        337        0.14       34.91
  23-Dec-19 |        337        0.14       35.05
  24-Dec-19 |        337        0.14       35.19
  25-Dec-19 |        337        0.14       35.33
  26-Dec-19 |        337        0.14       35.47
  27-Dec-19 |        337        0.14       35.61
  28-Dec-19 |        337        0.14       35.74
  29-Dec-19 |        337        0.14       35.88
  30-Dec-19 |        337        0.14       36.02
  31-Dec-19 |        337        0.14       36.16
   1-Jan-20 |        337        0.14       36.30
   2-Jan-20 |        337        0.14       36.44
   3-Jan-20 |        337        0.14       36.58
   4-Jan-20 |        337        0.14       36.72
   5-Jan-20 |        337        0.14       36.86
   6-Jan-20 |        337        0.14       37.00
   7-Jan-20 |        337        0.14       37.13
   8-Jan-20 |        337        0.14       37.27
   9-Jan-20 |        337        0.14       37.41
  10-Jan-20 |        337        0.14       37.55
  11-Jan-20 |        337        0.14       37.69
  12-Jan-20 |        337        0.14       37.83
  13-Jan-20 |        337        0.14       37.97
  14-Jan-20 |        337        0.14       38.11
  15-Jan-20 |        337        0.14       38.25
  16-Jan-20 |        337        0.14       38.39
  17-Jan-20 |        337        0.14       38.53
  18-Jan-20 |        337        0.14       38.66
  19-Jan-20 |        337        0.14       38.80
  20-Jan-20 |        337        0.14       38.94
  21-Jan-20 |        337        0.14       39.08
  22-Jan-20 |        337        0.14       39.22
  23-Jan-20 |        337        0.14       39.36
  24-Jan-20 |        337        0.14       39.50
  25-Jan-20 |        337        0.14       39.64
  26-Jan-20 |        337        0.14       39.78
  27-Jan-20 |        337        0.14       39.92
  28-Jan-20 |        337        0.14       40.06
  29-Jan-20 |        337        0.14       40.19
  30-Jan-20 |        337        0.14       40.33
  31-Jan-20 |        337        0.14       40.47
   1-Feb-20 |        337        0.14       40.61
   2-Feb-20 |        337        0.14       40.75
   3-Feb-20 |        337        0.14       40.89
   4-Feb-20 |        337        0.14       41.03
   5-Feb-20 |        337        0.14       41.17
   6-Feb-20 |        337        0.14       41.31
   7-Feb-20 |        337        0.14       41.45
   8-Feb-20 |        337        0.14       41.59
   9-Feb-20 |        337        0.14       41.72
  10-Feb-20 |        337        0.14       41.86
  11-Feb-20 |        337        0.14       42.00
  12-Feb-20 |        337        0.14       42.14
  13-Feb-20 |        337        0.14       42.28
  14-Feb-20 |        337        0.14       42.42
  15-Feb-20 |        337        0.14       42.56
  16-Feb-20 |        337        0.14       42.70
  17-Feb-20 |        337        0.14       42.84
  18-Feb-20 |        337        0.14       42.98
  19-Feb-20 |        337        0.14       43.12
  20-Feb-20 |        337        0.14       43.25
  21-Feb-20 |        337        0.14       43.39
  22-Feb-20 |        337        0.14       43.53
  23-Feb-20 |        337        0.14       43.67
  24-Feb-20 |        337        0.14       43.81
  25-Feb-20 |        337        0.14       43.95
  26-Feb-20 |        337        0.14       44.09
  27-Feb-20 |        337        0.14       44.23
  28-Feb-20 |        337        0.14       44.37
  29-Feb-20 |        337        0.14       44.51
   1-Mar-20 |        337        0.14       44.65
   2-Mar-20 |        337        0.14       44.78
   3-Mar-20 |        337        0.14       44.92
   4-Mar-20 |        337        0.14       45.06
   5-Mar-20 |        337        0.14       45.20
   6-Mar-20 |        337        0.14       45.34
   7-Mar-20 |        337        0.14       45.48
   8-Mar-20 |        337        0.14       45.62
   9-Mar-20 |        337        0.14       45.76
  10-Mar-20 |        337        0.14       45.90
  11-Mar-20 |        337        0.14       46.04
  12-Mar-20 |        337        0.14       46.18
  13-Mar-20 |        337        0.14       46.31
  14-Mar-20 |        337        0.14       46.45
  15-Mar-20 |        337        0.14       46.59
  16-Mar-20 |        337        0.14       46.73
  17-Mar-20 |        337        0.14       46.87
  18-Mar-20 |        337        0.14       47.01
  19-Mar-20 |        337        0.14       47.15
  20-Mar-20 |        337        0.14       47.29
  21-Mar-20 |        337        0.14       47.43
  22-Mar-20 |        337        0.14       47.57
  23-Mar-20 |        337        0.14       47.71
  24-Mar-20 |        337        0.14       47.84
  25-Mar-20 |        337        0.14       47.98
  26-Mar-20 |        337        0.14       48.12
  27-Mar-20 |        337        0.14       48.26
  28-Mar-20 |        337        0.14       48.40
  29-Mar-20 |        337        0.14       48.54
  30-Mar-20 |        337        0.14       48.68
  31-Mar-20 |        337        0.14       48.82
   1-Apr-20 |        337        0.14       48.96
   2-Apr-20 |        337        0.14       49.10
   3-Apr-20 |        337        0.14       49.24
   4-Apr-20 |        337        0.14       49.37
   5-Apr-20 |        337        0.14       49.51
   6-Apr-20 |        337        0.14       49.65
   7-Apr-20 |        337        0.14       49.79
   8-Apr-20 |        337        0.14       49.93
   9-Apr-20 |        337        0.14       50.07
  10-Apr-20 |        337        0.14       50.21
  11-Apr-20 |        337        0.14       50.35
  12-Apr-20 |        337        0.14       50.49
  13-Apr-20 |        337        0.14       50.63
  14-Apr-20 |        337        0.14       50.76
  15-Apr-20 |        337        0.14       50.90
  16-Apr-20 |        337        0.14       51.04
  17-Apr-20 |        337        0.14       51.18
  18-Apr-20 |        337        0.14       51.32
  19-Apr-20 |        337        0.14       51.46
  20-Apr-20 |        337        0.14       51.60
  21-Apr-20 |        337        0.14       51.74
  22-Apr-20 |        337        0.14       51.88
  23-Apr-20 |        337        0.14       52.02
  24-Apr-20 |        337        0.14       52.16
  25-Apr-20 |        337        0.14       52.29
  26-Apr-20 |        337        0.14       52.43
  27-Apr-20 |        337        0.14       52.57
  28-Apr-20 |        337        0.14       52.71
  29-Apr-20 |        337        0.14       52.85
  30-Apr-20 |        337        0.14       52.99
   1-May-20 |        337        0.14       53.13
   2-May-20 |        337        0.14       53.27
   3-May-20 |        337        0.14       53.41
   4-May-20 |        337        0.14       53.55
   5-May-20 |        337        0.14       53.69
   6-May-20 |        337        0.14       53.82
   7-May-20 |        337        0.14       53.96
   8-May-20 |        337        0.14       54.10
   9-May-20 |        337        0.14       54.24
  10-May-20 |        337        0.14       54.38
  11-May-20 |        337        0.14       54.52
  12-May-20 |        337        0.14       54.66
  13-May-20 |        337        0.14       54.80
  14-May-20 |        337        0.14       54.94
  15-May-20 |        337        0.14       55.08
  16-May-20 |        337        0.14       55.22
  17-May-20 |        337        0.14       55.35
  18-May-20 |        337        0.14       55.49
  19-May-20 |        337        0.14       55.63
  20-May-20 |        337        0.14       55.77
  21-May-20 |        337        0.14       55.91
  22-May-20 |        337        0.14       56.05
  23-May-20 |        337        0.14       56.19
  24-May-20 |        337        0.14       56.33
  25-May-20 |        337        0.14       56.47
  26-May-20 |        337        0.14       56.61
  27-May-20 |        337        0.14       56.75
  28-May-20 |        337        0.14       56.88
  29-May-20 |        337        0.14       57.02
  30-May-20 |        337        0.14       57.16
  31-May-20 |        337        0.14       57.30
   1-Jun-20 |        337        0.14       57.44
   2-Jun-20 |        337        0.14       57.58
   3-Jun-20 |        337        0.14       57.72
   4-Jun-20 |        337        0.14       57.86
   5-Jun-20 |        337        0.14       58.00
   6-Jun-20 |        337        0.14       58.14
   7-Jun-20 |        337        0.14       58.28
   8-Jun-20 |        337        0.14       58.41
   9-Jun-20 |        337        0.14       58.55
  10-Jun-20 |        337        0.14       58.69
  11-Jun-20 |        337        0.14       58.83
  12-Jun-20 |        337        0.14       58.97
  13-Jun-20 |        337        0.14       59.11
  14-Jun-20 |        337        0.14       59.25
  15-Jun-20 |        337        0.14       59.39
  16-Jun-20 |        337        0.14       59.53
  17-Jun-20 |        337        0.14       59.67
  18-Jun-20 |        337        0.14       59.81
  19-Jun-20 |        337        0.14       59.94
  20-Jun-20 |        337        0.14       60.08
  21-Jun-20 |        337        0.14       60.22
  22-Jun-20 |        337        0.14       60.36
  23-Jun-20 |        337        0.14       60.50
  24-Jun-20 |        337        0.14       60.64
  25-Jun-20 |        337        0.14       60.78
  26-Jun-20 |        337        0.14       60.92
  27-Jun-20 |        337        0.14       61.06
  28-Jun-20 |        337        0.14       61.20
  29-Jun-20 |        337        0.14       61.34
  30-Jun-20 |        337        0.14       61.47
   1-Jul-20 |        337        0.14       61.61
   2-Jul-20 |        337        0.14       61.75
   3-Jul-20 |        337        0.14       61.89
   4-Jul-20 |        337        0.14       62.03
   5-Jul-20 |        337        0.14       62.17
   6-Jul-20 |        337        0.14       62.31
   7-Jul-20 |        337        0.14       62.45
   8-Jul-20 |        337        0.14       62.59
   9-Jul-20 |        337        0.14       62.73
  10-Jul-20 |        337        0.14       62.87
  11-Jul-20 |        337        0.14       63.00
  12-Jul-20 |        337        0.14       63.14
  13-Jul-20 |        337        0.14       63.28
  14-Jul-20 |        337        0.14       63.42
  15-Jul-20 |        337        0.14       63.56
  16-Jul-20 |        337        0.14       63.70
  17-Jul-20 |        337        0.14       63.84
  18-Jul-20 |        337        0.14       63.98
  19-Jul-20 |        337        0.14       64.12
  20-Jul-20 |        337        0.14       64.26
  21-Jul-20 |        337        0.14       64.39
  22-Jul-20 |        337        0.14       64.53
  23-Jul-20 |        337        0.14       64.67
  24-Jul-20 |        337        0.14       64.81
  25-Jul-20 |        337        0.14       64.95
  26-Jul-20 |        337        0.14       65.09
  27-Jul-20 |        337        0.14       65.23
  28-Jul-20 |        337        0.14       65.37
  29-Jul-20 |        337        0.14       65.51
  30-Jul-20 |        337        0.14       65.65
  31-Jul-20 |        337        0.14       65.79
   1-Aug-20 |        337        0.14       65.92
   2-Aug-20 |        337        0.14       66.06
   3-Aug-20 |        337        0.14       66.20
   4-Aug-20 |        337        0.14       66.34
   5-Aug-20 |        337        0.14       66.48
   6-Aug-20 |        337        0.14       66.62
   7-Aug-20 |        337        0.14       66.76
   8-Aug-20 |        337        0.14       66.90
   9-Aug-20 |        337        0.14       67.04
  10-Aug-20 |        337        0.14       67.18
  11-Aug-20 |        337        0.14       67.32
  12-Aug-20 |        337        0.14       67.45
  13-Aug-20 |        337        0.14       67.59
  14-Aug-20 |        337        0.14       67.73
  15-Aug-20 |        337        0.14       67.87
  16-Aug-20 |        337        0.14       68.01
  17-Aug-20 |        337        0.14       68.15
  18-Aug-20 |        337        0.14       68.29
  19-Aug-20 |        337        0.14       68.43
  20-Aug-20 |        337        0.14       68.57
  21-Aug-20 |        337        0.14       68.71
  22-Aug-20 |        337        0.14       68.85
  23-Aug-20 |        337        0.14       68.98
  24-Aug-20 |        337        0.14       69.12
  25-Aug-20 |        337        0.14       69.26
  26-Aug-20 |        337        0.14       69.40
  27-Aug-20 |        337        0.14       69.54
  28-Aug-20 |        337        0.14       69.68
  29-Aug-20 |        337        0.14       69.82
  30-Aug-20 |        337        0.14       69.96
  31-Aug-20 |        337        0.14       70.10
   1-Sep-20 |        337        0.14       70.24
   2-Sep-20 |        337        0.14       70.38
   3-Sep-20 |        337        0.14       70.51
   4-Sep-20 |        337        0.14       70.65
   5-Sep-20 |        337        0.14       70.79
   6-Sep-20 |        337        0.14       70.93
   7-Sep-20 |        337        0.14       71.07
   8-Sep-20 |        337        0.14       71.21
   9-Sep-20 |        337        0.14       71.35
  10-Sep-20 |        337        0.14       71.49
  11-Sep-20 |        337        0.14       71.63
  12-Sep-20 |        337        0.14       71.77
  13-Sep-20 |        337        0.14       71.91
  14-Sep-20 |        337        0.14       72.04
  15-Sep-20 |        337        0.14       72.18
  16-Sep-20 |        337        0.14       72.32
  17-Sep-20 |        337        0.14       72.46
  18-Sep-20 |        337        0.14       72.60
  19-Sep-20 |        337        0.14       72.74
  20-Sep-20 |        337        0.14       72.88
  21-Sep-20 |        337        0.14       73.02
  22-Sep-20 |        337        0.14       73.16
  23-Sep-20 |        337        0.14       73.30
  24-Sep-20 |        337        0.14       73.44
  25-Sep-20 |        337        0.14       73.57
  26-Sep-20 |        337        0.14       73.71
  27-Sep-20 |        337        0.14       73.85
  28-Sep-20 |        337        0.14       73.99
  29-Sep-20 |        337        0.14       74.13
  30-Sep-20 |        337        0.14       74.27
   1-Oct-20 |        337        0.14       74.41
   2-Oct-20 |        337        0.14       74.55
   3-Oct-20 |        337        0.14       74.69
   4-Oct-20 |        337        0.14       74.83
   5-Oct-20 |        337        0.14       74.97
   6-Oct-20 |        337        0.14       75.10
   7-Oct-20 |        337        0.14       75.24
   8-Oct-20 |        337        0.14       75.38
   9-Oct-20 |        337        0.14       75.52
  10-Oct-20 |        337        0.14       75.66
  11-Oct-20 |        337        0.14       75.80
  12-Oct-20 |        337        0.14       75.94
  13-Oct-20 |        337        0.14       76.08
  14-Oct-20 |        337        0.14       76.22
  15-Oct-20 |        337        0.14       76.36
  16-Oct-20 |        337        0.14       76.50
  17-Oct-20 |        337        0.14       76.63
  18-Oct-20 |        337        0.14       76.77
  19-Oct-20 |        337        0.14       76.91
  20-Oct-20 |        337        0.14       77.05
  21-Oct-20 |        337        0.14       77.19
  22-Oct-20 |        337        0.14       77.33
  23-Oct-20 |        337        0.14       77.47
  24-Oct-20 |        337        0.14       77.61
  25-Oct-20 |        337        0.14       77.75
  26-Oct-20 |        337        0.14       77.89
  27-Oct-20 |        337        0.14       78.03
  28-Oct-20 |        337        0.14       78.16
  29-Oct-20 |        337        0.14       78.30
  30-Oct-20 |        337        0.14       78.44
  31-Oct-20 |        337        0.14       78.58
   1-Nov-20 |        337        0.14       78.72
   2-Nov-20 |        337        0.14       78.86
   3-Nov-20 |        337        0.14       79.00
   4-Nov-20 |        337        0.14       79.14
   5-Nov-20 |        337        0.14       79.28
   6-Nov-20 |        337        0.14       79.42
   7-Nov-20 |        337        0.14       79.55
   8-Nov-20 |        337        0.14       79.69
   9-Nov-20 |        337        0.14       79.83
  10-Nov-20 |        337        0.14       79.97
  11-Nov-20 |        337        0.14       80.11
  12-Nov-20 |        337        0.14       80.25
  13-Nov-20 |        337        0.14       80.39
  14-Nov-20 |        337        0.14       80.53
  15-Nov-20 |        337        0.14       80.67
  16-Nov-20 |        337        0.14       80.81
  17-Nov-20 |        337        0.14       80.95
  18-Nov-20 |        337        0.14       81.08
  19-Nov-20 |        337        0.14       81.22
  20-Nov-20 |        337        0.14       81.36
  21-Nov-20 |        337        0.14       81.50
  22-Nov-20 |        337        0.14       81.64
  23-Nov-20 |        337        0.14       81.78
  24-Nov-20 |        337        0.14       81.92
  25-Nov-20 |        337        0.14       82.06
  26-Nov-20 |        337        0.14       82.20
  27-Nov-20 |        337        0.14       82.34
  28-Nov-20 |        337        0.14       82.48
  29-Nov-20 |        337        0.14       82.61
  30-Nov-20 |        337        0.14       82.75
   1-Dec-20 |        337        0.14       82.89
   2-Dec-20 |        337        0.14       83.03
   3-Dec-20 |        337        0.14       83.17
   4-Dec-20 |        337        0.14       83.31
   5-Dec-20 |        337        0.14       83.45
   6-Dec-20 |        337        0.14       83.59
   7-Dec-20 |        337        0.14       83.73
   8-Dec-20 |        337        0.14       83.87
   9-Dec-20 |        337        0.14       84.01
  10-Dec-20 |        337        0.14       84.14
  11-Dec-20 |        337        0.14       84.28
  12-Dec-20 |        337        0.14       84.42
  13-Dec-20 |        337        0.14       84.56
  14-Dec-20 |        337        0.14       84.70
  15-Dec-20 |        337        0.14       84.84
  16-Dec-20 |        337        0.14       84.98
  17-Dec-20 |        337        0.14       85.12
  18-Dec-20 |        337        0.14       85.26
  19-Dec-20 |        337        0.14       85.40
  20-Dec-20 |        337        0.14       85.54
  21-Dec-20 |        337        0.14       85.67
  22-Dec-20 |        337        0.14       85.81
  23-Dec-20 |        337        0.14       85.95
  24-Dec-20 |        337        0.14       86.09
  25-Dec-20 |        337        0.14       86.23
  26-Dec-20 |        337        0.14       86.37
  27-Dec-20 |        337        0.14       86.51
  28-Dec-20 |        337        0.14       86.65
  29-Dec-20 |        337        0.14       86.79
  30-Dec-20 |        337        0.14       86.93
  31-Dec-20 |        337        0.14       87.07
   1-Jan-21 |        337        0.14       87.20
   2-Jan-21 |        337        0.14       87.34
   3-Jan-21 |        337        0.14       87.48
   4-Jan-21 |        337        0.14       87.62
   5-Jan-21 |        337        0.14       87.76
   6-Jan-21 |        337        0.14       87.90
   7-Jan-21 |        337        0.14       88.04
   8-Jan-21 |        337        0.14       88.18
   9-Jan-21 |        337        0.14       88.32
  10-Jan-21 |        337        0.14       88.46
  11-Jan-21 |        337        0.14       88.60
  12-Jan-21 |        337        0.14       88.73
  13-Jan-21 |        337        0.14       88.87
  14-Jan-21 |        337        0.14       89.01
  15-Jan-21 |        337        0.14       89.15
  16-Jan-21 |        337        0.14       89.29
  17-Jan-21 |        337        0.14       89.43
  18-Jan-21 |        337        0.14       89.57
  19-Jan-21 |        337        0.14       89.71
  20-Jan-21 |        337        0.14       89.85
  21-Jan-21 |        337        0.14       89.99
  22-Jan-21 |        337        0.14       90.13
  23-Jan-21 |        337        0.14       90.26
  24-Jan-21 |        337        0.14       90.40
  25-Jan-21 |        337        0.14       90.54
  26-Jan-21 |        337        0.14       90.68
  27-Jan-21 |        337        0.14       90.82
  28-Jan-21 |        337        0.14       90.96
  29-Jan-21 |        337        0.14       91.10
  30-Jan-21 |        337        0.14       91.24
  31-Jan-21 |        337        0.14       91.38
   1-Feb-21 |        337        0.14       91.52
   2-Feb-21 |        337        0.14       91.66
   3-Feb-21 |        337        0.14       91.79
   4-Feb-21 |        337        0.14       91.93
   5-Feb-21 |        337        0.14       92.07
   6-Feb-21 |        337        0.14       92.21
   7-Feb-21 |        337        0.14       92.35
   8-Feb-21 |        337        0.14       92.49
   9-Feb-21 |        337        0.14       92.63
  10-Feb-21 |        337        0.14       92.77
  11-Feb-21 |        337        0.14       92.91
  12-Feb-21 |        337        0.14       93.05
  13-Feb-21 |        337        0.14       93.18
  14-Feb-21 |        337        0.14       93.32
  15-Feb-21 |        337        0.14       93.46
  16-Feb-21 |        337        0.14       93.60
  17-Feb-21 |        337        0.14       93.74
  18-Feb-21 |        337        0.14       93.88
  19-Feb-21 |        337        0.14       94.02
  20-Feb-21 |        337        0.14       94.16
  21-Feb-21 |        337        0.14       94.30
  22-Feb-21 |        337        0.14       94.44
  23-Feb-21 |        337        0.14       94.58
  24-Feb-21 |        337        0.14       94.71
  25-Feb-21 |        337        0.14       94.85
  26-Feb-21 |        337        0.14       94.99
  27-Feb-21 |        337        0.14       95.13
  28-Feb-21 |        337        0.14       95.27
   1-Mar-21 |        337        0.14       95.41
   2-Mar-21 |        337        0.14       95.55
   3-Mar-21 |        337        0.14       95.69
   4-Mar-21 |        337        0.14       95.83
   5-Mar-21 |        337        0.14       95.97
   6-Mar-21 |        337        0.14       96.11
   7-Mar-21 |        337        0.14       96.24
   8-Mar-21 |        337        0.14       96.38
   9-Mar-21 |        337        0.14       96.52
  10-Mar-21 |        337        0.14       96.66
  11-Mar-21 |        337        0.14       96.80
  12-Mar-21 |        337        0.14       96.94
  13-Mar-21 |        337        0.14       97.08
  14-Mar-21 |        337        0.14       97.22
  15-Mar-21 |        337        0.14       97.36
  16-Mar-21 |        337        0.14       97.50
  17-Mar-21 |        337        0.14       97.64
  18-Mar-21 |        337        0.14       97.77
  19-Mar-21 |        337        0.14       97.91
  20-Mar-21 |        337        0.14       98.05
  21-Mar-21 |        337        0.14       98.19
  22-Mar-21 |        337        0.14       98.33
  23-Mar-21 |        337        0.14       98.47
  24-Mar-21 |        337        0.14       98.61
  25-Mar-21 |        337        0.14       98.75
  26-Mar-21 |        337        0.14       98.89
  27-Mar-21 |        337        0.14       99.03
  28-Mar-21 |        337        0.14       99.17
  29-Mar-21 |        337        0.14       99.30
  30-Mar-21 |        337        0.14       99.44
  31-Mar-21 |        337        0.14       99.58
   1-Apr-21 |        337        0.14       99.72
   2-Apr-21 |        337        0.14       99.86
   3-Apr-21 |        337        0.14      100.00
------------+-----------------------------------
      Total |    242,303      100.00

. ** 242,303 Observations. 337 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ** Generate a week variable
. drop week

. gen int week = floor((date-td(31dec2018))/7)+1

. la var week "Week"

. 
. ** Generate a month variable which goes from the 16th of each month to the 15th of the next month. 
. ** This definition of month aligns with the implementation of ETS market in its initial Stages. 
. ** Nick Cox's code:
. drop month16

. gen month16 = date if day(date) == 16
(234,215 missing values generated)

. //      replace month16 = mdy(1, 16, 2019) in 1
. replace month16 = month16[_n-1] if missing(month16)
(234,215 real changes made)

. la var month16 "Month, defined as 16th of this month to 15th of next month"

. gen month16_sif = month16

. format month16 %tddd-Mon-YY

. la var month16_sif "[SIF] Month-year. For convenience."

. order month16_sif, a(month16)

. sort composite_id date

. ** Check days in each month for one device. Looks good.
. *tab month16 if composite_id == "GJSRT100740111"
. 
. ** Generate Dummy for Interregnum period of market
. ** Covid lockdown -- 23 March 2020 to 11 October 2021. 
. ** Mock-III started on 12 October 2021.
. gen D_interregnum_week = week >= 65 & week <= 93

. replace D_interregnum_week =1 if week == 99 | week == 100
(4,718 real changes made)

. la var D_interregnum_week ///
>         "[Week-level] =1 if Interregnum due to Covid-19 lockdown, zero otherwise."

. 
. drop extinct_with_assignment removed_from_sample comment

. 
. ** Remove plants that have no observation from 16-Apr-19 to 03-Apr-21.
. bysort gpcb_id: egen pct_report = mean(!missing(pm_mass_rule0)) if ///
>         month16 >= date("2019jul16", "YMD") & D_interregnum_week == 0
(103,796 missing values generated)

. sort composite_id date

. bysort gpcb_id: egen pct_report_1 = mean(pct_report)

. drop if pct_report_1 == 0
(19,413 observations deleted)

. drop pct_report pct_report_1

. sort composite_id date  

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        310        0.14        0.14
  17-Apr-19 |        310        0.14        0.28
  18-Apr-19 |        310        0.14        0.42
  19-Apr-19 |        310        0.14        0.56
  20-Apr-19 |        310        0.14        0.70
  21-Apr-19 |        310        0.14        0.83
  22-Apr-19 |        310        0.14        0.97
  23-Apr-19 |        310        0.14        1.11
  24-Apr-19 |        310        0.14        1.25
  25-Apr-19 |        310        0.14        1.39
  26-Apr-19 |        310        0.14        1.53
  27-Apr-19 |        310        0.14        1.67
  28-Apr-19 |        310        0.14        1.81
  29-Apr-19 |        310        0.14        1.95
  30-Apr-19 |        310        0.14        2.09
   1-May-19 |        310        0.14        2.23
   2-May-19 |        310        0.14        2.36
   3-May-19 |        310        0.14        2.50
   4-May-19 |        310        0.14        2.64
   5-May-19 |        310        0.14        2.78
   6-May-19 |        310        0.14        2.92
   7-May-19 |        310        0.14        3.06
   8-May-19 |        310        0.14        3.20
   9-May-19 |        310        0.14        3.34
  10-May-19 |        310        0.14        3.48
  11-May-19 |        310        0.14        3.62
  12-May-19 |        310        0.14        3.76
  13-May-19 |        310        0.14        3.89
  14-May-19 |        310        0.14        4.03
  15-May-19 |        310        0.14        4.17
  16-May-19 |        310        0.14        4.31
  17-May-19 |        310        0.14        4.45
  18-May-19 |        310        0.14        4.59
  19-May-19 |        310        0.14        4.73
  20-May-19 |        310        0.14        4.87
  21-May-19 |        310        0.14        5.01
  22-May-19 |        310        0.14        5.15
  23-May-19 |        310        0.14        5.29
  24-May-19 |        310        0.14        5.42
  25-May-19 |        310        0.14        5.56
  26-May-19 |        310        0.14        5.70
  27-May-19 |        310        0.14        5.84
  28-May-19 |        310        0.14        5.98
  29-May-19 |        310        0.14        6.12
  30-May-19 |        310        0.14        6.26
  31-May-19 |        310        0.14        6.40
   1-Jun-19 |        310        0.14        6.54
   2-Jun-19 |        310        0.14        6.68
   3-Jun-19 |        310        0.14        6.82
   4-Jun-19 |        310        0.14        6.95
   5-Jun-19 |        310        0.14        7.09
   6-Jun-19 |        310        0.14        7.23
   7-Jun-19 |        310        0.14        7.37
   8-Jun-19 |        310        0.14        7.51
   9-Jun-19 |        310        0.14        7.65
  10-Jun-19 |        310        0.14        7.79
  11-Jun-19 |        310        0.14        7.93
  12-Jun-19 |        310        0.14        8.07
  13-Jun-19 |        310        0.14        8.21
  14-Jun-19 |        310        0.14        8.34
  15-Jun-19 |        310        0.14        8.48
  16-Jun-19 |        310        0.14        8.62
  17-Jun-19 |        310        0.14        8.76
  18-Jun-19 |        310        0.14        8.90
  19-Jun-19 |        310        0.14        9.04
  20-Jun-19 |        310        0.14        9.18
  21-Jun-19 |        310        0.14        9.32
  22-Jun-19 |        310        0.14        9.46
  23-Jun-19 |        310        0.14        9.60
  24-Jun-19 |        310        0.14        9.74
  25-Jun-19 |        310        0.14        9.87
  26-Jun-19 |        310        0.14       10.01
  27-Jun-19 |        310        0.14       10.15
  28-Jun-19 |        310        0.14       10.29
  29-Jun-19 |        310        0.14       10.43
  30-Jun-19 |        310        0.14       10.57
   1-Jul-19 |        310        0.14       10.71
   2-Jul-19 |        310        0.14       10.85
   3-Jul-19 |        310        0.14       10.99
   4-Jul-19 |        310        0.14       11.13
   5-Jul-19 |        310        0.14       11.27
   6-Jul-19 |        310        0.14       11.40
   7-Jul-19 |        310        0.14       11.54
   8-Jul-19 |        310        0.14       11.68
   9-Jul-19 |        310        0.14       11.82
  10-Jul-19 |        310        0.14       11.96
  11-Jul-19 |        310        0.14       12.10
  12-Jul-19 |        310        0.14       12.24
  13-Jul-19 |        310        0.14       12.38
  14-Jul-19 |        310        0.14       12.52
  15-Jul-19 |        310        0.14       12.66
  16-Jul-19 |        310        0.14       12.80
  17-Jul-19 |        310        0.14       12.93
  18-Jul-19 |        310        0.14       13.07
  19-Jul-19 |        310        0.14       13.21
  20-Jul-19 |        310        0.14       13.35
  21-Jul-19 |        310        0.14       13.49
  22-Jul-19 |        310        0.14       13.63
  23-Jul-19 |        310        0.14       13.77
  24-Jul-19 |        310        0.14       13.91
  25-Jul-19 |        310        0.14       14.05
  26-Jul-19 |        310        0.14       14.19
  27-Jul-19 |        310        0.14       14.33
  28-Jul-19 |        310        0.14       14.46
  29-Jul-19 |        310        0.14       14.60
  30-Jul-19 |        310        0.14       14.74
  31-Jul-19 |        310        0.14       14.88
   1-Aug-19 |        310        0.14       15.02
   2-Aug-19 |        310        0.14       15.16
   3-Aug-19 |        310        0.14       15.30
   4-Aug-19 |        310        0.14       15.44
   5-Aug-19 |        310        0.14       15.58
   6-Aug-19 |        310        0.14       15.72
   7-Aug-19 |        310        0.14       15.86
   8-Aug-19 |        310        0.14       15.99
   9-Aug-19 |        310        0.14       16.13
  10-Aug-19 |        310        0.14       16.27
  11-Aug-19 |        310        0.14       16.41
  12-Aug-19 |        310        0.14       16.55
  13-Aug-19 |        310        0.14       16.69
  14-Aug-19 |        310        0.14       16.83
  15-Aug-19 |        310        0.14       16.97
  16-Aug-19 |        310        0.14       17.11
  17-Aug-19 |        310        0.14       17.25
  18-Aug-19 |        310        0.14       17.39
  19-Aug-19 |        310        0.14       17.52
  20-Aug-19 |        310        0.14       17.66
  21-Aug-19 |        310        0.14       17.80
  22-Aug-19 |        310        0.14       17.94
  23-Aug-19 |        310        0.14       18.08
  24-Aug-19 |        310        0.14       18.22
  25-Aug-19 |        310        0.14       18.36
  26-Aug-19 |        310        0.14       18.50
  27-Aug-19 |        310        0.14       18.64
  28-Aug-19 |        310        0.14       18.78
  29-Aug-19 |        310        0.14       18.92
  30-Aug-19 |        310        0.14       19.05
  31-Aug-19 |        310        0.14       19.19
   1-Sep-19 |        310        0.14       19.33
   2-Sep-19 |        310        0.14       19.47
   3-Sep-19 |        310        0.14       19.61
   4-Sep-19 |        310        0.14       19.75
   5-Sep-19 |        310        0.14       19.89
   6-Sep-19 |        310        0.14       20.03
   7-Sep-19 |        310        0.14       20.17
   8-Sep-19 |        310        0.14       20.31
   9-Sep-19 |        310        0.14       20.45
  10-Sep-19 |        310        0.14       20.58
  11-Sep-19 |        310        0.14       20.72
  12-Sep-19 |        310        0.14       20.86
  13-Sep-19 |        310        0.14       21.00
  14-Sep-19 |        310        0.14       21.14
  15-Sep-19 |        310        0.14       21.28
  16-Sep-19 |        310        0.14       21.42
  17-Sep-19 |        310        0.14       21.56
  18-Sep-19 |        310        0.14       21.70
  19-Sep-19 |        310        0.14       21.84
  20-Sep-19 |        310        0.14       21.97
  21-Sep-19 |        310        0.14       22.11
  22-Sep-19 |        310        0.14       22.25
  23-Sep-19 |        310        0.14       22.39
  24-Sep-19 |        310        0.14       22.53
  25-Sep-19 |        310        0.14       22.67
  26-Sep-19 |        310        0.14       22.81
  27-Sep-19 |        310        0.14       22.95
  28-Sep-19 |        310        0.14       23.09
  29-Sep-19 |        310        0.14       23.23
  30-Sep-19 |        310        0.14       23.37
   1-Oct-19 |        310        0.14       23.50
   2-Oct-19 |        310        0.14       23.64
   3-Oct-19 |        310        0.14       23.78
   4-Oct-19 |        310        0.14       23.92
   5-Oct-19 |        310        0.14       24.06
   6-Oct-19 |        310        0.14       24.20
   7-Oct-19 |        310        0.14       24.34
   8-Oct-19 |        310        0.14       24.48
   9-Oct-19 |        310        0.14       24.62
  10-Oct-19 |        310        0.14       24.76
  11-Oct-19 |        310        0.14       24.90
  12-Oct-19 |        310        0.14       25.03
  13-Oct-19 |        310        0.14       25.17
  14-Oct-19 |        310        0.14       25.31
  15-Oct-19 |        310        0.14       25.45
  16-Oct-19 |        310        0.14       25.59
  17-Oct-19 |        310        0.14       25.73
  18-Oct-19 |        310        0.14       25.87
  19-Oct-19 |        310        0.14       26.01
  20-Oct-19 |        310        0.14       26.15
  21-Oct-19 |        310        0.14       26.29
  22-Oct-19 |        310        0.14       26.43
  23-Oct-19 |        310        0.14       26.56
  24-Oct-19 |        310        0.14       26.70
  25-Oct-19 |        310        0.14       26.84
  26-Oct-19 |        310        0.14       26.98
  27-Oct-19 |        310        0.14       27.12
  28-Oct-19 |        310        0.14       27.26
  29-Oct-19 |        310        0.14       27.40
  30-Oct-19 |        310        0.14       27.54
  31-Oct-19 |        310        0.14       27.68
   1-Nov-19 |        310        0.14       27.82
   2-Nov-19 |        310        0.14       27.96
   3-Nov-19 |        310        0.14       28.09
   4-Nov-19 |        310        0.14       28.23
   5-Nov-19 |        310        0.14       28.37
   6-Nov-19 |        310        0.14       28.51
   7-Nov-19 |        310        0.14       28.65
   8-Nov-19 |        310        0.14       28.79
   9-Nov-19 |        310        0.14       28.93
  10-Nov-19 |        310        0.14       29.07
  11-Nov-19 |        310        0.14       29.21
  12-Nov-19 |        310        0.14       29.35
  13-Nov-19 |        310        0.14       29.49
  14-Nov-19 |        310        0.14       29.62
  15-Nov-19 |        310        0.14       29.76
  16-Nov-19 |        310        0.14       29.90
  17-Nov-19 |        310        0.14       30.04
  18-Nov-19 |        310        0.14       30.18
  19-Nov-19 |        310        0.14       30.32
  20-Nov-19 |        310        0.14       30.46
  21-Nov-19 |        310        0.14       30.60
  22-Nov-19 |        310        0.14       30.74
  23-Nov-19 |        310        0.14       30.88
  24-Nov-19 |        310        0.14       31.02
  25-Nov-19 |        310        0.14       31.15
  26-Nov-19 |        310        0.14       31.29
  27-Nov-19 |        310        0.14       31.43
  28-Nov-19 |        310        0.14       31.57
  29-Nov-19 |        310        0.14       31.71
  30-Nov-19 |        310        0.14       31.85
   1-Dec-19 |        310        0.14       31.99
   2-Dec-19 |        310        0.14       32.13
   3-Dec-19 |        310        0.14       32.27
   4-Dec-19 |        310        0.14       32.41
   5-Dec-19 |        310        0.14       32.55
   6-Dec-19 |        310        0.14       32.68
   7-Dec-19 |        310        0.14       32.82
   8-Dec-19 |        310        0.14       32.96
   9-Dec-19 |        310        0.14       33.10
  10-Dec-19 |        310        0.14       33.24
  11-Dec-19 |        310        0.14       33.38
  12-Dec-19 |        310        0.14       33.52
  13-Dec-19 |        310        0.14       33.66
  14-Dec-19 |        310        0.14       33.80
  15-Dec-19 |        310        0.14       33.94
  16-Dec-19 |        310        0.14       34.08
  17-Dec-19 |        310        0.14       34.21
  18-Dec-19 |        310        0.14       34.35
  19-Dec-19 |        310        0.14       34.49
  20-Dec-19 |        310        0.14       34.63
  21-Dec-19 |        310        0.14       34.77
  22-Dec-19 |        310        0.14       34.91
  23-Dec-19 |        310        0.14       35.05
  24-Dec-19 |        310        0.14       35.19
  25-Dec-19 |        310        0.14       35.33
  26-Dec-19 |        310        0.14       35.47
  27-Dec-19 |        310        0.14       35.61
  28-Dec-19 |        310        0.14       35.74
  29-Dec-19 |        310        0.14       35.88
  30-Dec-19 |        310        0.14       36.02
  31-Dec-19 |        310        0.14       36.16
   1-Jan-20 |        310        0.14       36.30
   2-Jan-20 |        310        0.14       36.44
   3-Jan-20 |        310        0.14       36.58
   4-Jan-20 |        310        0.14       36.72
   5-Jan-20 |        310        0.14       36.86
   6-Jan-20 |        310        0.14       37.00
   7-Jan-20 |        310        0.14       37.13
   8-Jan-20 |        310        0.14       37.27
   9-Jan-20 |        310        0.14       37.41
  10-Jan-20 |        310        0.14       37.55
  11-Jan-20 |        310        0.14       37.69
  12-Jan-20 |        310        0.14       37.83
  13-Jan-20 |        310        0.14       37.97
  14-Jan-20 |        310        0.14       38.11
  15-Jan-20 |        310        0.14       38.25
  16-Jan-20 |        310        0.14       38.39
  17-Jan-20 |        310        0.14       38.53
  18-Jan-20 |        310        0.14       38.66
  19-Jan-20 |        310        0.14       38.80
  20-Jan-20 |        310        0.14       38.94
  21-Jan-20 |        310        0.14       39.08
  22-Jan-20 |        310        0.14       39.22
  23-Jan-20 |        310        0.14       39.36
  24-Jan-20 |        310        0.14       39.50
  25-Jan-20 |        310        0.14       39.64
  26-Jan-20 |        310        0.14       39.78
  27-Jan-20 |        310        0.14       39.92
  28-Jan-20 |        310        0.14       40.06
  29-Jan-20 |        310        0.14       40.19
  30-Jan-20 |        310        0.14       40.33
  31-Jan-20 |        310        0.14       40.47
   1-Feb-20 |        310        0.14       40.61
   2-Feb-20 |        310        0.14       40.75
   3-Feb-20 |        310        0.14       40.89
   4-Feb-20 |        310        0.14       41.03
   5-Feb-20 |        310        0.14       41.17
   6-Feb-20 |        310        0.14       41.31
   7-Feb-20 |        310        0.14       41.45
   8-Feb-20 |        310        0.14       41.59
   9-Feb-20 |        310        0.14       41.72
  10-Feb-20 |        310        0.14       41.86
  11-Feb-20 |        310        0.14       42.00
  12-Feb-20 |        310        0.14       42.14
  13-Feb-20 |        310        0.14       42.28
  14-Feb-20 |        310        0.14       42.42
  15-Feb-20 |        310        0.14       42.56
  16-Feb-20 |        310        0.14       42.70
  17-Feb-20 |        310        0.14       42.84
  18-Feb-20 |        310        0.14       42.98
  19-Feb-20 |        310        0.14       43.12
  20-Feb-20 |        310        0.14       43.25
  21-Feb-20 |        310        0.14       43.39
  22-Feb-20 |        310        0.14       43.53
  23-Feb-20 |        310        0.14       43.67
  24-Feb-20 |        310        0.14       43.81
  25-Feb-20 |        310        0.14       43.95
  26-Feb-20 |        310        0.14       44.09
  27-Feb-20 |        310        0.14       44.23
  28-Feb-20 |        310        0.14       44.37
  29-Feb-20 |        310        0.14       44.51
   1-Mar-20 |        310        0.14       44.65
   2-Mar-20 |        310        0.14       44.78
   3-Mar-20 |        310        0.14       44.92
   4-Mar-20 |        310        0.14       45.06
   5-Mar-20 |        310        0.14       45.20
   6-Mar-20 |        310        0.14       45.34
   7-Mar-20 |        310        0.14       45.48
   8-Mar-20 |        310        0.14       45.62
   9-Mar-20 |        310        0.14       45.76
  10-Mar-20 |        310        0.14       45.90
  11-Mar-20 |        310        0.14       46.04
  12-Mar-20 |        310        0.14       46.18
  13-Mar-20 |        310        0.14       46.31
  14-Mar-20 |        310        0.14       46.45
  15-Mar-20 |        310        0.14       46.59
  16-Mar-20 |        310        0.14       46.73
  17-Mar-20 |        310        0.14       46.87
  18-Mar-20 |        310        0.14       47.01
  19-Mar-20 |        310        0.14       47.15
  20-Mar-20 |        310        0.14       47.29
  21-Mar-20 |        310        0.14       47.43
  22-Mar-20 |        310        0.14       47.57
  23-Mar-20 |        310        0.14       47.71
  24-Mar-20 |        310        0.14       47.84
  25-Mar-20 |        310        0.14       47.98
  26-Mar-20 |        310        0.14       48.12
  27-Mar-20 |        310        0.14       48.26
  28-Mar-20 |        310        0.14       48.40
  29-Mar-20 |        310        0.14       48.54
  30-Mar-20 |        310        0.14       48.68
  31-Mar-20 |        310        0.14       48.82
   1-Apr-20 |        310        0.14       48.96
   2-Apr-20 |        310        0.14       49.10
   3-Apr-20 |        310        0.14       49.24
   4-Apr-20 |        310        0.14       49.37
   5-Apr-20 |        310        0.14       49.51
   6-Apr-20 |        310        0.14       49.65
   7-Apr-20 |        310        0.14       49.79
   8-Apr-20 |        310        0.14       49.93
   9-Apr-20 |        310        0.14       50.07
  10-Apr-20 |        310        0.14       50.21
  11-Apr-20 |        310        0.14       50.35
  12-Apr-20 |        310        0.14       50.49
  13-Apr-20 |        310        0.14       50.63
  14-Apr-20 |        310        0.14       50.76
  15-Apr-20 |        310        0.14       50.90
  16-Apr-20 |        310        0.14       51.04
  17-Apr-20 |        310        0.14       51.18
  18-Apr-20 |        310        0.14       51.32
  19-Apr-20 |        310        0.14       51.46
  20-Apr-20 |        310        0.14       51.60
  21-Apr-20 |        310        0.14       51.74
  22-Apr-20 |        310        0.14       51.88
  23-Apr-20 |        310        0.14       52.02
  24-Apr-20 |        310        0.14       52.16
  25-Apr-20 |        310        0.14       52.29
  26-Apr-20 |        310        0.14       52.43
  27-Apr-20 |        310        0.14       52.57
  28-Apr-20 |        310        0.14       52.71
  29-Apr-20 |        310        0.14       52.85
  30-Apr-20 |        310        0.14       52.99
   1-May-20 |        310        0.14       53.13
   2-May-20 |        310        0.14       53.27
   3-May-20 |        310        0.14       53.41
   4-May-20 |        310        0.14       53.55
   5-May-20 |        310        0.14       53.69
   6-May-20 |        310        0.14       53.82
   7-May-20 |        310        0.14       53.96
   8-May-20 |        310        0.14       54.10
   9-May-20 |        310        0.14       54.24
  10-May-20 |        310        0.14       54.38
  11-May-20 |        310        0.14       54.52
  12-May-20 |        310        0.14       54.66
  13-May-20 |        310        0.14       54.80
  14-May-20 |        310        0.14       54.94
  15-May-20 |        310        0.14       55.08
  16-May-20 |        310        0.14       55.22
  17-May-20 |        310        0.14       55.35
  18-May-20 |        310        0.14       55.49
  19-May-20 |        310        0.14       55.63
  20-May-20 |        310        0.14       55.77
  21-May-20 |        310        0.14       55.91
  22-May-20 |        310        0.14       56.05
  23-May-20 |        310        0.14       56.19
  24-May-20 |        310        0.14       56.33
  25-May-20 |        310        0.14       56.47
  26-May-20 |        310        0.14       56.61
  27-May-20 |        310        0.14       56.75
  28-May-20 |        310        0.14       56.88
  29-May-20 |        310        0.14       57.02
  30-May-20 |        310        0.14       57.16
  31-May-20 |        310        0.14       57.30
   1-Jun-20 |        310        0.14       57.44
   2-Jun-20 |        310        0.14       57.58
   3-Jun-20 |        310        0.14       57.72
   4-Jun-20 |        310        0.14       57.86
   5-Jun-20 |        310        0.14       58.00
   6-Jun-20 |        310        0.14       58.14
   7-Jun-20 |        310        0.14       58.28
   8-Jun-20 |        310        0.14       58.41
   9-Jun-20 |        310        0.14       58.55
  10-Jun-20 |        310        0.14       58.69
  11-Jun-20 |        310        0.14       58.83
  12-Jun-20 |        310        0.14       58.97
  13-Jun-20 |        310        0.14       59.11
  14-Jun-20 |        310        0.14       59.25
  15-Jun-20 |        310        0.14       59.39
  16-Jun-20 |        310        0.14       59.53
  17-Jun-20 |        310        0.14       59.67
  18-Jun-20 |        310        0.14       59.81
  19-Jun-20 |        310        0.14       59.94
  20-Jun-20 |        310        0.14       60.08
  21-Jun-20 |        310        0.14       60.22
  22-Jun-20 |        310        0.14       60.36
  23-Jun-20 |        310        0.14       60.50
  24-Jun-20 |        310        0.14       60.64
  25-Jun-20 |        310        0.14       60.78
  26-Jun-20 |        310        0.14       60.92
  27-Jun-20 |        310        0.14       61.06
  28-Jun-20 |        310        0.14       61.20
  29-Jun-20 |        310        0.14       61.34
  30-Jun-20 |        310        0.14       61.47
   1-Jul-20 |        310        0.14       61.61
   2-Jul-20 |        310        0.14       61.75
   3-Jul-20 |        310        0.14       61.89
   4-Jul-20 |        310        0.14       62.03
   5-Jul-20 |        310        0.14       62.17
   6-Jul-20 |        310        0.14       62.31
   7-Jul-20 |        310        0.14       62.45
   8-Jul-20 |        310        0.14       62.59
   9-Jul-20 |        310        0.14       62.73
  10-Jul-20 |        310        0.14       62.87
  11-Jul-20 |        310        0.14       63.00
  12-Jul-20 |        310        0.14       63.14
  13-Jul-20 |        310        0.14       63.28
  14-Jul-20 |        310        0.14       63.42
  15-Jul-20 |        310        0.14       63.56
  16-Jul-20 |        310        0.14       63.70
  17-Jul-20 |        310        0.14       63.84
  18-Jul-20 |        310        0.14       63.98
  19-Jul-20 |        310        0.14       64.12
  20-Jul-20 |        310        0.14       64.26
  21-Jul-20 |        310        0.14       64.39
  22-Jul-20 |        310        0.14       64.53
  23-Jul-20 |        310        0.14       64.67
  24-Jul-20 |        310        0.14       64.81
  25-Jul-20 |        310        0.14       64.95
  26-Jul-20 |        310        0.14       65.09
  27-Jul-20 |        310        0.14       65.23
  28-Jul-20 |        310        0.14       65.37
  29-Jul-20 |        310        0.14       65.51
  30-Jul-20 |        310        0.14       65.65
  31-Jul-20 |        310        0.14       65.79
   1-Aug-20 |        310        0.14       65.92
   2-Aug-20 |        310        0.14       66.06
   3-Aug-20 |        310        0.14       66.20
   4-Aug-20 |        310        0.14       66.34
   5-Aug-20 |        310        0.14       66.48
   6-Aug-20 |        310        0.14       66.62
   7-Aug-20 |        310        0.14       66.76
   8-Aug-20 |        310        0.14       66.90
   9-Aug-20 |        310        0.14       67.04
  10-Aug-20 |        310        0.14       67.18
  11-Aug-20 |        310        0.14       67.32
  12-Aug-20 |        310        0.14       67.45
  13-Aug-20 |        310        0.14       67.59
  14-Aug-20 |        310        0.14       67.73
  15-Aug-20 |        310        0.14       67.87
  16-Aug-20 |        310        0.14       68.01
  17-Aug-20 |        310        0.14       68.15
  18-Aug-20 |        310        0.14       68.29
  19-Aug-20 |        310        0.14       68.43
  20-Aug-20 |        310        0.14       68.57
  21-Aug-20 |        310        0.14       68.71
  22-Aug-20 |        310        0.14       68.85
  23-Aug-20 |        310        0.14       68.98
  24-Aug-20 |        310        0.14       69.12
  25-Aug-20 |        310        0.14       69.26
  26-Aug-20 |        310        0.14       69.40
  27-Aug-20 |        310        0.14       69.54
  28-Aug-20 |        310        0.14       69.68
  29-Aug-20 |        310        0.14       69.82
  30-Aug-20 |        310        0.14       69.96
  31-Aug-20 |        310        0.14       70.10
   1-Sep-20 |        310        0.14       70.24
   2-Sep-20 |        310        0.14       70.38
   3-Sep-20 |        310        0.14       70.51
   4-Sep-20 |        310        0.14       70.65
   5-Sep-20 |        310        0.14       70.79
   6-Sep-20 |        310        0.14       70.93
   7-Sep-20 |        310        0.14       71.07
   8-Sep-20 |        310        0.14       71.21
   9-Sep-20 |        310        0.14       71.35
  10-Sep-20 |        310        0.14       71.49
  11-Sep-20 |        310        0.14       71.63
  12-Sep-20 |        310        0.14       71.77
  13-Sep-20 |        310        0.14       71.91
  14-Sep-20 |        310        0.14       72.04
  15-Sep-20 |        310        0.14       72.18
  16-Sep-20 |        310        0.14       72.32
  17-Sep-20 |        310        0.14       72.46
  18-Sep-20 |        310        0.14       72.60
  19-Sep-20 |        310        0.14       72.74
  20-Sep-20 |        310        0.14       72.88
  21-Sep-20 |        310        0.14       73.02
  22-Sep-20 |        310        0.14       73.16
  23-Sep-20 |        310        0.14       73.30
  24-Sep-20 |        310        0.14       73.44
  25-Sep-20 |        310        0.14       73.57
  26-Sep-20 |        310        0.14       73.71
  27-Sep-20 |        310        0.14       73.85
  28-Sep-20 |        310        0.14       73.99
  29-Sep-20 |        310        0.14       74.13
  30-Sep-20 |        310        0.14       74.27
   1-Oct-20 |        310        0.14       74.41
   2-Oct-20 |        310        0.14       74.55
   3-Oct-20 |        310        0.14       74.69
   4-Oct-20 |        310        0.14       74.83
   5-Oct-20 |        310        0.14       74.97
   6-Oct-20 |        310        0.14       75.10
   7-Oct-20 |        310        0.14       75.24
   8-Oct-20 |        310        0.14       75.38
   9-Oct-20 |        310        0.14       75.52
  10-Oct-20 |        310        0.14       75.66
  11-Oct-20 |        310        0.14       75.80
  12-Oct-20 |        310        0.14       75.94
  13-Oct-20 |        310        0.14       76.08
  14-Oct-20 |        310        0.14       76.22
  15-Oct-20 |        310        0.14       76.36
  16-Oct-20 |        310        0.14       76.50
  17-Oct-20 |        310        0.14       76.63
  18-Oct-20 |        310        0.14       76.77
  19-Oct-20 |        310        0.14       76.91
  20-Oct-20 |        310        0.14       77.05
  21-Oct-20 |        310        0.14       77.19
  22-Oct-20 |        310        0.14       77.33
  23-Oct-20 |        310        0.14       77.47
  24-Oct-20 |        310        0.14       77.61
  25-Oct-20 |        310        0.14       77.75
  26-Oct-20 |        310        0.14       77.89
  27-Oct-20 |        310        0.14       78.03
  28-Oct-20 |        310        0.14       78.16
  29-Oct-20 |        310        0.14       78.30
  30-Oct-20 |        310        0.14       78.44
  31-Oct-20 |        310        0.14       78.58
   1-Nov-20 |        310        0.14       78.72
   2-Nov-20 |        310        0.14       78.86
   3-Nov-20 |        310        0.14       79.00
   4-Nov-20 |        310        0.14       79.14
   5-Nov-20 |        310        0.14       79.28
   6-Nov-20 |        310        0.14       79.42
   7-Nov-20 |        310        0.14       79.55
   8-Nov-20 |        310        0.14       79.69
   9-Nov-20 |        310        0.14       79.83
  10-Nov-20 |        310        0.14       79.97
  11-Nov-20 |        310        0.14       80.11
  12-Nov-20 |        310        0.14       80.25
  13-Nov-20 |        310        0.14       80.39
  14-Nov-20 |        310        0.14       80.53
  15-Nov-20 |        310        0.14       80.67
  16-Nov-20 |        310        0.14       80.81
  17-Nov-20 |        310        0.14       80.95
  18-Nov-20 |        310        0.14       81.08
  19-Nov-20 |        310        0.14       81.22
  20-Nov-20 |        310        0.14       81.36
  21-Nov-20 |        310        0.14       81.50
  22-Nov-20 |        310        0.14       81.64
  23-Nov-20 |        310        0.14       81.78
  24-Nov-20 |        310        0.14       81.92
  25-Nov-20 |        310        0.14       82.06
  26-Nov-20 |        310        0.14       82.20
  27-Nov-20 |        310        0.14       82.34
  28-Nov-20 |        310        0.14       82.48
  29-Nov-20 |        310        0.14       82.61
  30-Nov-20 |        310        0.14       82.75
   1-Dec-20 |        310        0.14       82.89
   2-Dec-20 |        310        0.14       83.03
   3-Dec-20 |        310        0.14       83.17
   4-Dec-20 |        310        0.14       83.31
   5-Dec-20 |        310        0.14       83.45
   6-Dec-20 |        310        0.14       83.59
   7-Dec-20 |        310        0.14       83.73
   8-Dec-20 |        310        0.14       83.87
   9-Dec-20 |        310        0.14       84.01
  10-Dec-20 |        310        0.14       84.14
  11-Dec-20 |        310        0.14       84.28
  12-Dec-20 |        310        0.14       84.42
  13-Dec-20 |        310        0.14       84.56
  14-Dec-20 |        310        0.14       84.70
  15-Dec-20 |        310        0.14       84.84
  16-Dec-20 |        310        0.14       84.98
  17-Dec-20 |        310        0.14       85.12
  18-Dec-20 |        310        0.14       85.26
  19-Dec-20 |        310        0.14       85.40
  20-Dec-20 |        310        0.14       85.54
  21-Dec-20 |        310        0.14       85.67
  22-Dec-20 |        310        0.14       85.81
  23-Dec-20 |        310        0.14       85.95
  24-Dec-20 |        310        0.14       86.09
  25-Dec-20 |        310        0.14       86.23
  26-Dec-20 |        310        0.14       86.37
  27-Dec-20 |        310        0.14       86.51
  28-Dec-20 |        310        0.14       86.65
  29-Dec-20 |        310        0.14       86.79
  30-Dec-20 |        310        0.14       86.93
  31-Dec-20 |        310        0.14       87.07
   1-Jan-21 |        310        0.14       87.20
   2-Jan-21 |        310        0.14       87.34
   3-Jan-21 |        310        0.14       87.48
   4-Jan-21 |        310        0.14       87.62
   5-Jan-21 |        310        0.14       87.76
   6-Jan-21 |        310        0.14       87.90
   7-Jan-21 |        310        0.14       88.04
   8-Jan-21 |        310        0.14       88.18
   9-Jan-21 |        310        0.14       88.32
  10-Jan-21 |        310        0.14       88.46
  11-Jan-21 |        310        0.14       88.60
  12-Jan-21 |        310        0.14       88.73
  13-Jan-21 |        310        0.14       88.87
  14-Jan-21 |        310        0.14       89.01
  15-Jan-21 |        310        0.14       89.15
  16-Jan-21 |        310        0.14       89.29
  17-Jan-21 |        310        0.14       89.43
  18-Jan-21 |        310        0.14       89.57
  19-Jan-21 |        310        0.14       89.71
  20-Jan-21 |        310        0.14       89.85
  21-Jan-21 |        310        0.14       89.99
  22-Jan-21 |        310        0.14       90.13
  23-Jan-21 |        310        0.14       90.26
  24-Jan-21 |        310        0.14       90.40
  25-Jan-21 |        310        0.14       90.54
  26-Jan-21 |        310        0.14       90.68
  27-Jan-21 |        310        0.14       90.82
  28-Jan-21 |        310        0.14       90.96
  29-Jan-21 |        310        0.14       91.10
  30-Jan-21 |        310        0.14       91.24
  31-Jan-21 |        310        0.14       91.38
   1-Feb-21 |        310        0.14       91.52
   2-Feb-21 |        310        0.14       91.66
   3-Feb-21 |        310        0.14       91.79
   4-Feb-21 |        310        0.14       91.93
   5-Feb-21 |        310        0.14       92.07
   6-Feb-21 |        310        0.14       92.21
   7-Feb-21 |        310        0.14       92.35
   8-Feb-21 |        310        0.14       92.49
   9-Feb-21 |        310        0.14       92.63
  10-Feb-21 |        310        0.14       92.77
  11-Feb-21 |        310        0.14       92.91
  12-Feb-21 |        310        0.14       93.05
  13-Feb-21 |        310        0.14       93.18
  14-Feb-21 |        310        0.14       93.32
  15-Feb-21 |        310        0.14       93.46
  16-Feb-21 |        310        0.14       93.60
  17-Feb-21 |        310        0.14       93.74
  18-Feb-21 |        310        0.14       93.88
  19-Feb-21 |        310        0.14       94.02
  20-Feb-21 |        310        0.14       94.16
  21-Feb-21 |        310        0.14       94.30
  22-Feb-21 |        310        0.14       94.44
  23-Feb-21 |        310        0.14       94.58
  24-Feb-21 |        310        0.14       94.71
  25-Feb-21 |        310        0.14       94.85
  26-Feb-21 |        310        0.14       94.99
  27-Feb-21 |        310        0.14       95.13
  28-Feb-21 |        310        0.14       95.27
   1-Mar-21 |        310        0.14       95.41
   2-Mar-21 |        310        0.14       95.55
   3-Mar-21 |        310        0.14       95.69
   4-Mar-21 |        310        0.14       95.83
   5-Mar-21 |        310        0.14       95.97
   6-Mar-21 |        310        0.14       96.11
   7-Mar-21 |        310        0.14       96.24
   8-Mar-21 |        310        0.14       96.38
   9-Mar-21 |        310        0.14       96.52
  10-Mar-21 |        310        0.14       96.66
  11-Mar-21 |        310        0.14       96.80
  12-Mar-21 |        310        0.14       96.94
  13-Mar-21 |        310        0.14       97.08
  14-Mar-21 |        310        0.14       97.22
  15-Mar-21 |        310        0.14       97.36
  16-Mar-21 |        310        0.14       97.50
  17-Mar-21 |        310        0.14       97.64
  18-Mar-21 |        310        0.14       97.77
  19-Mar-21 |        310        0.14       97.91
  20-Mar-21 |        310        0.14       98.05
  21-Mar-21 |        310        0.14       98.19
  22-Mar-21 |        310        0.14       98.33
  23-Mar-21 |        310        0.14       98.47
  24-Mar-21 |        310        0.14       98.61
  25-Mar-21 |        310        0.14       98.75
  26-Mar-21 |        310        0.14       98.89
  27-Mar-21 |        310        0.14       99.03
  28-Mar-21 |        310        0.14       99.17
  29-Mar-21 |        310        0.14       99.30
  30-Mar-21 |        310        0.14       99.44
  31-Mar-21 |        310        0.14       99.58
   1-Apr-21 |        310        0.14       99.72
   2-Apr-21 |        310        0.14       99.86
   3-Apr-21 |        310        0.14      100.00
------------+-----------------------------------
      Total |    222,890      100.00

. ** 222,890 Observations. 310 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ********************************************************************************
. ********************* [1] CALCULATE ACTUAL STACK DAY MASS **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Replace tot_report_hrs to zero 
.         ** if the stack was not sending a valid caliberated stack-day kg/hr that day
.         gen tot_report_hrs_rule`i' = tot_report_hrs
  3.         replace tot_report_hrs_rule`i' = 0 if D_vctransmitting_rule`i' == 0
  4.         label var tot_report_hrs_rule`i' ///
>                 "[RE-LABELED] Stack-day VALID CALIBRATED Reporting Hours from CEMS - rule `i'"
  5. 
.         ** Calculate DAILY actual mass emissions using CEMA Day Reporting Hours
.         gen stack_daily_mass_actual_rule`i' = pm_mass_rule`i' * tot_report_hrs_rule`i'
  6.         la var stack_daily_mass_actual_rule`i' ///
>                 "Stack Day Actual Mass Emissions (kg) from CEMS Reported Hours - rule `i'"
  7. 
. }
(13,811 real changes made)
(92,469 missing values generated)
(13,152 real changes made)
(91,810 missing values generated)
(51,885 real changes made)
(130,543 missing values generated)
(51,410 real changes made)
(130,068 missing values generated)
(72,276 real changes made)
(150,934 missing values generated)
(71,909 real changes made)
(150,567 missing values generated)
(61,133 real changes made)
(139,791 missing values generated)
(60,702 real changes made)
(139,360 missing values generated)
(30,334 real changes made)
(108,992 missing values generated)
(29,748 real changes made)
(108,406 missing values generated)

. 
. ********************************************************************************
. ***************** [2] DAILY NON-REPORTING HOURS FOR IMPUTATION *****************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate DAILY non-reporting hours for imputation
.         gen daily_nonreport_hrs_rule`i' = 24 - tot_report_hrs_rule`i'
  3.         order daily_nonreport_hrs_rule`i', a(tot_report_hrs_rule`i')
  4.         la var daily_nonreport_hrs_rule`i' ///
>                 "Stack Day NON-Reporting Hours - CEMS - rule `i'"
  5. 
. }

. 
. ********************************************************************************
. ********* [3] For Imp: GENERATE STACK'S OWN WEEK and MONTH MEAN KG/HR **********
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate stack's own week mean kg/hr for missing pm mass values
.         bysort composite_id week: egen week_mean_mass_rule`i' = mean(pm_mass_rule`i')
  3.         label var week_mean_mass_rule`i' "Stack Week Mean kg/hr - rule `i'"
  4. 
.         ** Calculate stack's own month mean kg/hr for stacks missing entire week of pm mass
.         bysort composite_id month16: egen month_mean_mass_rule`i' = mean(pm_mass_rule`i')
  5.         label var month_mean_mass_rule`i' "Stack Month Mean kg/hr - rule `i'"
  6. 
. }
(77,721 missing values generated)
(57,827 missing values generated)
(77,182 missing values generated)
(57,581 missing values generated)
(119,617 missing values generated)
(106,097 missing values generated)
(119,246 missing values generated)
(105,943 missing values generated)
(141,866 missing values generated)
(131,145 missing values generated)
(141,642 missing values generated)
(131,114 missing values generated)
(129,965 missing values generated)
(117,838 missing values generated)
(129,650 missing values generated)
(117,715 missing values generated)
(96,226 missing values generated)
(79,484 missing values generated)
(95,778 missing values generated)
(79,269 missing values generated)

. 
. /*******************************************************************************
>            NOW READY FOR IMPUTATION RULE 0a.
>            THE IMPLEMENTATION OF THIS RULE WILL BE:
> 
>            1)   IMPUTE STACK'S OWN WEEK MEAN PM_MASS (KG/HR) FOR ALL MISSING VALUES
>            OF STACK DAY PM_MASS (KG/HR). 
>            2)   IF WEEK MEAN KG/HR IS MISSING, IMPUTE MONTH MEAN PM_MASS (KG/HR)
>            3)   THE FINAL EMISSION QUANTITY IS:
> 
>            VALIDATED STACK MASS (KG) = 
>            ACTUAL STACK MASS (KG) USING CEMS REPORTED HOURS +
>            IMPUTED STACK MASS (KG) USING CEMS NON-REPORTED HOURS
>    ****************************************************************************/
. 
. 
. ********************************************************************************
. ******************** [4] CALCULATE DAILY STACK IMPUTED MASS ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate PER DAY imputed emissions
.         gen stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * week_mean_mass_rule`i'
  3.         replace stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * month_mean_mass_rule`i' ///
>                 if week_mean_mass_rule`i' == .
  4.         la var stack_daily_mass_imp_rule`i' ///
>                 "Stack-day Imputed Mass Emissions (kg) from CEMS Non-Reported Hours - rule`i'"
  5. 
.         ** Correct for week of Diwali 2019 when imputation should be zero.
.         replace stack_daily_mass_imp_rule`i' = 0 if ///
>                 date >= date("2019oct26", "YMD") & ///
>                 date <= date("2019nov03", "YMD") & ///
>                 stack_daily_mass_imp_rule`i' != .
  6. 
. }
(77,721 missing values generated)
(20,043 real changes made)
(1,449 real changes made)
(77,182 missing values generated)
(19,752 real changes made)
(1,446 real changes made)
(119,617 missing values generated)
(13,643 real changes made)
(987 real changes made)
(119,246 missing values generated)
(13,416 real changes made)
(982 real changes made)
(141,866 missing values generated)
(10,810 real changes made)
(805 real changes made)
(141,642 missing values generated)
(10,617 real changes made)
(800 real changes made)
(129,965 missing values generated)
(12,239 real changes made)
(904 real changes made)
(129,650 missing values generated)
(12,037 real changes made)
(899 real changes made)
(96,226 missing values generated)
(16,872 real changes made)
(1,264 real changes made)
(95,778 missing values generated)
(16,635 real changes made)
(1,253 real changes made)

. 
. ********************************************************************************
. ******************* [5] CALCULATE DAILY STACK VALIDATED MASS *******************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate validated DAY emissions per stack
.         gen stack_daily_mass_val_rule`i' = stack_daily_mass_actual_rule`i' + stack_daily_mass_imp_rule`i'
  3.         replace stack_daily_mass_val_rule`i' = stack_daily_mass_imp_rule`i' ///
>                 if stack_daily_mass_val_rule`i' == .
  4.         la var stack_daily_mass_val_rule`i' ///
>                 "Stack Day Validated Mass Emissions (kg) (=Stack-day Actual + Stack-day Imp) - rule `i'"
  5. 
. }
(92,469 missing values generated)
(34,791 real changes made)
note: label truncated to 80 characters
(91,810 missing values generated)
(34,380 real changes made)
note: label truncated to 80 characters
(130,543 missing values generated)
(24,569 real changes made)
note: label truncated to 80 characters
(130,068 missing values generated)
(24,238 real changes made)
note: label truncated to 80 characters
(150,934 missing values generated)
(19,878 real changes made)
note: label truncated to 80 characters
(150,567 missing values generated)
(19,542 real changes made)
note: label truncated to 80 characters
(139,791 missing values generated)
(22,065 real changes made)
note: label truncated to 80 characters
(139,360 missing values generated)
(21,747 real changes made)
note: label truncated to 80 characters
(108,992 missing values generated)
(29,638 real changes made)
note: label truncated to 80 characters
(108,406 missing values generated)
(29,263 real changes made)
note: label truncated to 80 characters

. 
. preserve

. keep date composite_id gpcb_id treatmentstatus month_mean_mass_rule0 stack_daily_mass_actual_rule0 stack_daily_mass_imp_rule0 stack_daily_mass_val_rule0

. order date composite_id gpcb_id treatmentstatus month_mean_mass_rule0 stack_daily_mass_actual_rule0 stack_daily_mass_imp_rule0 stack_daily_mass_val_rule0

. rename month_mean_mass_rule0 mass_rate_imp_0

. rename stack_daily_mass_actual_rule0 stack_daily_mass_actual_0

. rename stack_daily_mass_imp_rule0 stack_daily_mass_imp_0

. rename stack_daily_mass_val_rule0 stack_daily_mass_val_0 

. save "$IMPUTATION_DATA_OUT/StackDayPMMassRule0.dta", replace
(file 02DataPipeline/emissions/imputation/StackDayPMMassRule0.dta not found)
file 02DataPipeline/emissions/imputation/StackDayPMMassRule0.dta saved

. restore

. 
.    
. /*******************************************************************************
>            NOW READY TO MAKE THE DEPENDENT VARIABLE FOR REGRESSIONS IN PART 6 
>            (6. TREATMENT EFFECT ANALYSIS). THIS VAR IS PLANT MONTH MASS (KG).
> 
>            STEPS TO CREATE THIS VARIABLE WILL BE:
> 
>            6.1) CALCULATE STACK WEEK MASS (KG), AND THEN PLANT WEEK MASS (KG).
>            FIRST GENERATE THESE VARIABLES IN THE STACK-DAY LEVEL DATA SET.
>            AND SAVE IT FOR FUTURE USE IF NEEDED ("_StackDayLevel.dta").
> 
>            6.2) THEN, COLLAPSE THE STACK-DAY LEVEL DATA SET TO KEEP ONE DATA POINT 
>            PER PLANT PER WEEK ("_PlantWeekLevel.dta"). 
> 
>            CONTAINS THE DEPENDENT VARIABLE: PLANT-WEEK MASS (KG) EMISSIONS 
>            USING IMPUTATION RULE 0.
>    ****************************************************************************/
. 
. 
. preserve

. 
. ********************************************************************************
. ********************* [6.1] GENERATE STACK-MONTH MASS (KG) *********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER STACK
.         bysort composite_id month16: egen stack_month_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id month16: egen miss_stack_month_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_month_mass_val_rule`i' = . if miss_stack_month_mass_val == 1
  5.         la var stack_month_mass_val_rule`i' ///
>                 "Stack-month Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_stack_month_mass_val
  7. 
. }
(57,827 real changes made, 57,827 to missing)
(57,581 real changes made, 57,581 to missing)
(106,097 real changes made, 106,097 to missing)
(105,943 real changes made, 105,943 to missing)
(131,145 real changes made, 131,145 to missing)
(131,114 real changes made, 131,114 to missing)
(117,838 real changes made, 117,838 to missing)
(117,715 real changes made, 117,715 to missing)
(79,484 real changes made, 79,484 to missing)
(79,269 real changes made, 79,269 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id month16: gen dump=_n

. bysort composite_id month16: keep if _n==_N     
(215,450 observations deleted)

. keep composite_id industry_id gpcb_id month16 treatmentstatus stack_month_mass_val* 

. ** 7,440 observations. 310 stacks. 24 months from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/StackMonthPMMassRule0.dta", replace
(file 02DataPipeline/emissions/imputation/StackMonthPMMassRule0.dta not found)
file 02DataPipeline/emissions/imputation/StackMonthPMMassRule0.dta saved

. *pause
. 
. ********************************************************************************
. ******************** [6.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. /**     AS PER NICK'S INSTRUCTION ON WEEKLY CALL 01 DEC 2020: FOR PLANTS WITH >1 STACK, 
>            WE WILL ONLY CALCULATE THEIR PLANT MASS (KG) SUM IF ALL STACKS ARE CONNECTED. 
>            IF STACKS ARE PARTIALLY CONNECTED (i.e., ONLY 1 OF 3 STACKS CONNECTED), 
>    THE ENTIRE PLANT SUM WILL BE MISSING.        **/
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER PLANT
.         bysort gpcb_id month16: egen ind_month_mass_val_rule`i' = sum(stack_month_mass_val_rule`i')
  3.         bysort gpcb_id month16: egen miss_ind_month_mass_val = max(missing(stack_month_mass_val_rule`i'))
  4.         replace ind_month_mass_val_rule`i' = . if miss_ind_month_mass_val == 1
  5.         la var stack_month_mass_val_rule`i' ///
>                 "Plant-month Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_month_mass_val
  7. 
. }
(1,982 real changes made, 1,982 to missing)
(1,974 real changes made, 1,974 to missing)
(3,585 real changes made, 3,585 to missing)
(3,580 real changes made, 3,580 to missing)
(4,427 real changes made, 4,427 to missing)
(4,426 real changes made, 4,426 to missing)
(3,968 real changes made, 3,968 to missing)
(3,964 real changes made, 3,964 to missing)
(2,705 real changes made, 2,705 to missing)
(2,698 real changes made, 2,698 to missing)

. 
. gen temp = 1

. bysort gpcb_id: egen num_stack = sum(temp)

. replace num_stack = num_stack / 24
(7,440 real changes made)

. drop temp

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id month16: gen dump=_n

. bysort gpcb_id month16: keep if _n==_N
(432 observations deleted)

. keep industry_id gpcb_id month16 treatmentstatus num_stack ind_month_mass_val* 

. ** 7,008 observations. 292 plants. 24 months from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/PlantMonthPMMassRule0.dta", replace
(file 02DataPipeline/emissions/imputation/PlantMonthPMMassRule0.dta not found)
file 02DataPipeline/emissions/imputation/PlantMonthPMMassRule0.dta saved

. 
. restore

. 
. /*******************************************************************************
>            NOW WE MAKE THE DEPENDENT VARIABLE FOR PLOTTING TIME SERIES 
>            THIS VAR IS PLANT WEEK MASS (KG).
>    ****************************************************************************/
. 
. preserve

. 
. ********************************************************************************
. ********************* [7.1] GENERATE STACK-WEEK MASS (KG) **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate WEEKLY validated emissions PER STACK
.         bysort composite_id week: egen stack_week_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id week: egen miss_stack_week_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_week_mass_val_rule`i' = . if miss_stack_week_mass_val == 1
  5.         la var stack_week_mass_val_rule`i' ///
>                 "Stack-week Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_stack_week_mass_val
  7. 
. }
(60,225 real changes made, 60,225 to missing)
(59,952 real changes made, 59,952 to missing)
(107,663 real changes made, 107,663 to missing)
(107,502 real changes made, 107,502 to missing)
(132,208 real changes made, 132,208 to missing)
(132,166 real changes made, 132,166 to missing)
(119,201 real changes made, 119,201 to missing)
(119,068 real changes made, 119,068 to missing)
(81,514 real changes made, 81,514 to missing)
(81,283 real changes made, 81,283 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id week: gen dump=_n

. bysort composite_id week: keep if _n==_N        
(190,960 observations deleted)

. keep composite_id industry_id gpcb_id week treatmentstatus stack_week_mass_val*

. ** 31,930 Observations. 310 Stacks. 103 weeks from April 2019 to March 2021.
. 
. ********************************************************************************
. ******************** [7.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate WEEKLY validated emissions PER PLANT
.         bysort gpcb_id week: egen ind_week_mass_val_rule`i' = sum(stack_week_mass_val_rule`i')
  3.         bysort gpcb_id week: egen miss_ind_week_mass_val = max(missing(stack_week_mass_val_rule`i'))
  4.         replace ind_week_mass_val_rule`i' = . if miss_ind_week_mass_val == 1
  5.         la var stack_week_mass_val_rule`i' ///
>                 "Plant-week Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_week_mass_val
  7. 
. }
(8,930 real changes made, 8,930 to missing)
(8,891 real changes made, 8,891 to missing)
(15,641 real changes made, 15,641 to missing)
(15,618 real changes made, 15,618 to missing)
(19,170 real changes made, 19,170 to missing)
(19,164 real changes made, 19,164 to missing)
(17,248 real changes made, 17,248 to missing)
(17,229 real changes made, 17,229 to missing)
(11,944 real changes made, 11,944 to missing)
(11,911 real changes made, 11,911 to missing)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id week: gen dump=_n

. bysort gpcb_id week: keep if _n==_N
(1,854 observations deleted)

. keep industry_id gpcb_id week treatmentstatus ind_week_mass_val* 

. ** 30,076 Observations. 292 Plants. 103 weeks from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/PlantWeekPMMassRule0.dta", replace
(file 02DataPipeline/emissions/imputation/PlantWeekPMMassRule0.dta not found)
file 02DataPipeline/emissions/imputation/PlantWeekPMMassRule0.dta saved

. 
. restore

. 
end of do-file

. do "$CODE_DIR/imputation/3a. Create PM Mass (Stack-Month, Plant-Period).do"

. /*******************************************************************************
>            Author:      Dipika Gawande
>            Project: ETS
>            Purpose: Create the dependent variable for regression, PLANT-MONTH KG 
>            EMISSIONS (KG/MONTH), using IMPUTATION RULE A: WITHIN-STACK 
>            MEAN MONTH KG/HR.
> 
>            Note: IMPUTATION RULE A is executed as follows:
> 
>            1) Missing values of Stack day kg/hr are imputed with the stack's 
>            own week mean kg/hr.
> 
>            2) If no week mean kg/hr (i.e., stack is missing entire week 
>            of stack-day observations, or is not CEMS-connected), all remaining 
>            missing values of Stack day kg/hr are imputed with the stack's own 
>            month mean kg/hr
> 
>            Date created: 15 September 2020
>            Version: STATA 15 MP
> 
>            Last edited: 13 January 2022
>            Edited by: Jeanne, Vineet, Kaixin
>    ****************************************************************************/
. 
. set more off

. clear all

. pause on

. 
. *-------------------------------------------------------------------------------
. 
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. drop if date < date("2019jan16", "YMD")
(0 observations deleted)

. format date %tddd-Mon-YY

. sort date composite_id

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        337        0.14        0.14
  17-Apr-19 |        337        0.14        0.28
  18-Apr-19 |        337        0.14        0.42
  19-Apr-19 |        337        0.14        0.56
  20-Apr-19 |        337        0.14        0.70
  21-Apr-19 |        337        0.14        0.83
  22-Apr-19 |        337        0.14        0.97
  23-Apr-19 |        337        0.14        1.11
  24-Apr-19 |        337        0.14        1.25
  25-Apr-19 |        337        0.14        1.39
  26-Apr-19 |        337        0.14        1.53
  27-Apr-19 |        337        0.14        1.67
  28-Apr-19 |        337        0.14        1.81
  29-Apr-19 |        337        0.14        1.95
  30-Apr-19 |        337        0.14        2.09
   1-May-19 |        337        0.14        2.23
   2-May-19 |        337        0.14        2.36
   3-May-19 |        337        0.14        2.50
   4-May-19 |        337        0.14        2.64
   5-May-19 |        337        0.14        2.78
   6-May-19 |        337        0.14        2.92
   7-May-19 |        337        0.14        3.06
   8-May-19 |        337        0.14        3.20
   9-May-19 |        337        0.14        3.34
  10-May-19 |        337        0.14        3.48
  11-May-19 |        337        0.14        3.62
  12-May-19 |        337        0.14        3.76
  13-May-19 |        337        0.14        3.89
  14-May-19 |        337        0.14        4.03
  15-May-19 |        337        0.14        4.17
  16-May-19 |        337        0.14        4.31
  17-May-19 |        337        0.14        4.45
  18-May-19 |        337        0.14        4.59
  19-May-19 |        337        0.14        4.73
  20-May-19 |        337        0.14        4.87
  21-May-19 |        337        0.14        5.01
  22-May-19 |        337        0.14        5.15
  23-May-19 |        337        0.14        5.29
  24-May-19 |        337        0.14        5.42
  25-May-19 |        337        0.14        5.56
  26-May-19 |        337        0.14        5.70
  27-May-19 |        337        0.14        5.84
  28-May-19 |        337        0.14        5.98
  29-May-19 |        337        0.14        6.12
  30-May-19 |        337        0.14        6.26
  31-May-19 |        337        0.14        6.40
   1-Jun-19 |        337        0.14        6.54
   2-Jun-19 |        337        0.14        6.68
   3-Jun-19 |        337        0.14        6.82
   4-Jun-19 |        337        0.14        6.95
   5-Jun-19 |        337        0.14        7.09
   6-Jun-19 |        337        0.14        7.23
   7-Jun-19 |        337        0.14        7.37
   8-Jun-19 |        337        0.14        7.51
   9-Jun-19 |        337        0.14        7.65
  10-Jun-19 |        337        0.14        7.79
  11-Jun-19 |        337        0.14        7.93
  12-Jun-19 |        337        0.14        8.07
  13-Jun-19 |        337        0.14        8.21
  14-Jun-19 |        337        0.14        8.34
  15-Jun-19 |        337        0.14        8.48
  16-Jun-19 |        337        0.14        8.62
  17-Jun-19 |        337        0.14        8.76
  18-Jun-19 |        337        0.14        8.90
  19-Jun-19 |        337        0.14        9.04
  20-Jun-19 |        337        0.14        9.18
  21-Jun-19 |        337        0.14        9.32
  22-Jun-19 |        337        0.14        9.46
  23-Jun-19 |        337        0.14        9.60
  24-Jun-19 |        337        0.14        9.74
  25-Jun-19 |        337        0.14        9.87
  26-Jun-19 |        337        0.14       10.01
  27-Jun-19 |        337        0.14       10.15
  28-Jun-19 |        337        0.14       10.29
  29-Jun-19 |        337        0.14       10.43
  30-Jun-19 |        337        0.14       10.57
   1-Jul-19 |        337        0.14       10.71
   2-Jul-19 |        337        0.14       10.85
   3-Jul-19 |        337        0.14       10.99
   4-Jul-19 |        337        0.14       11.13
   5-Jul-19 |        337        0.14       11.27
   6-Jul-19 |        337        0.14       11.40
   7-Jul-19 |        337        0.14       11.54
   8-Jul-19 |        337        0.14       11.68
   9-Jul-19 |        337        0.14       11.82
  10-Jul-19 |        337        0.14       11.96
  11-Jul-19 |        337        0.14       12.10
  12-Jul-19 |        337        0.14       12.24
  13-Jul-19 |        337        0.14       12.38
  14-Jul-19 |        337        0.14       12.52
  15-Jul-19 |        337        0.14       12.66
  16-Jul-19 |        337        0.14       12.80
  17-Jul-19 |        337        0.14       12.93
  18-Jul-19 |        337        0.14       13.07
  19-Jul-19 |        337        0.14       13.21
  20-Jul-19 |        337        0.14       13.35
  21-Jul-19 |        337        0.14       13.49
  22-Jul-19 |        337        0.14       13.63
  23-Jul-19 |        337        0.14       13.77
  24-Jul-19 |        337        0.14       13.91
  25-Jul-19 |        337        0.14       14.05
  26-Jul-19 |        337        0.14       14.19
  27-Jul-19 |        337        0.14       14.33
  28-Jul-19 |        337        0.14       14.46
  29-Jul-19 |        337        0.14       14.60
  30-Jul-19 |        337        0.14       14.74
  31-Jul-19 |        337        0.14       14.88
   1-Aug-19 |        337        0.14       15.02
   2-Aug-19 |        337        0.14       15.16
   3-Aug-19 |        337        0.14       15.30
   4-Aug-19 |        337        0.14       15.44
   5-Aug-19 |        337        0.14       15.58
   6-Aug-19 |        337        0.14       15.72
   7-Aug-19 |        337        0.14       15.86
   8-Aug-19 |        337        0.14       15.99
   9-Aug-19 |        337        0.14       16.13
  10-Aug-19 |        337        0.14       16.27
  11-Aug-19 |        337        0.14       16.41
  12-Aug-19 |        337        0.14       16.55
  13-Aug-19 |        337        0.14       16.69
  14-Aug-19 |        337        0.14       16.83
  15-Aug-19 |        337        0.14       16.97
  16-Aug-19 |        337        0.14       17.11
  17-Aug-19 |        337        0.14       17.25
  18-Aug-19 |        337        0.14       17.39
  19-Aug-19 |        337        0.14       17.52
  20-Aug-19 |        337        0.14       17.66
  21-Aug-19 |        337        0.14       17.80
  22-Aug-19 |        337        0.14       17.94
  23-Aug-19 |        337        0.14       18.08
  24-Aug-19 |        337        0.14       18.22
  25-Aug-19 |        337        0.14       18.36
  26-Aug-19 |        337        0.14       18.50
  27-Aug-19 |        337        0.14       18.64
  28-Aug-19 |        337        0.14       18.78
  29-Aug-19 |        337        0.14       18.92
  30-Aug-19 |        337        0.14       19.05
  31-Aug-19 |        337        0.14       19.19
   1-Sep-19 |        337        0.14       19.33
   2-Sep-19 |        337        0.14       19.47
   3-Sep-19 |        337        0.14       19.61
   4-Sep-19 |        337        0.14       19.75
   5-Sep-19 |        337        0.14       19.89
   6-Sep-19 |        337        0.14       20.03
   7-Sep-19 |        337        0.14       20.17
   8-Sep-19 |        337        0.14       20.31
   9-Sep-19 |        337        0.14       20.45
  10-Sep-19 |        337        0.14       20.58
  11-Sep-19 |        337        0.14       20.72
  12-Sep-19 |        337        0.14       20.86
  13-Sep-19 |        337        0.14       21.00
  14-Sep-19 |        337        0.14       21.14
  15-Sep-19 |        337        0.14       21.28
  16-Sep-19 |        337        0.14       21.42
  17-Sep-19 |        337        0.14       21.56
  18-Sep-19 |        337        0.14       21.70
  19-Sep-19 |        337        0.14       21.84
  20-Sep-19 |        337        0.14       21.97
  21-Sep-19 |        337        0.14       22.11
  22-Sep-19 |        337        0.14       22.25
  23-Sep-19 |        337        0.14       22.39
  24-Sep-19 |        337        0.14       22.53
  25-Sep-19 |        337        0.14       22.67
  26-Sep-19 |        337        0.14       22.81
  27-Sep-19 |        337        0.14       22.95
  28-Sep-19 |        337        0.14       23.09
  29-Sep-19 |        337        0.14       23.23
  30-Sep-19 |        337        0.14       23.37
   1-Oct-19 |        337        0.14       23.50
   2-Oct-19 |        337        0.14       23.64
   3-Oct-19 |        337        0.14       23.78
   4-Oct-19 |        337        0.14       23.92
   5-Oct-19 |        337        0.14       24.06
   6-Oct-19 |        337        0.14       24.20
   7-Oct-19 |        337        0.14       24.34
   8-Oct-19 |        337        0.14       24.48
   9-Oct-19 |        337        0.14       24.62
  10-Oct-19 |        337        0.14       24.76
  11-Oct-19 |        337        0.14       24.90
  12-Oct-19 |        337        0.14       25.03
  13-Oct-19 |        337        0.14       25.17
  14-Oct-19 |        337        0.14       25.31
  15-Oct-19 |        337        0.14       25.45
  16-Oct-19 |        337        0.14       25.59
  17-Oct-19 |        337        0.14       25.73
  18-Oct-19 |        337        0.14       25.87
  19-Oct-19 |        337        0.14       26.01
  20-Oct-19 |        337        0.14       26.15
  21-Oct-19 |        337        0.14       26.29
  22-Oct-19 |        337        0.14       26.43
  23-Oct-19 |        337        0.14       26.56
  24-Oct-19 |        337        0.14       26.70
  25-Oct-19 |        337        0.14       26.84
  26-Oct-19 |        337        0.14       26.98
  27-Oct-19 |        337        0.14       27.12
  28-Oct-19 |        337        0.14       27.26
  29-Oct-19 |        337        0.14       27.40
  30-Oct-19 |        337        0.14       27.54
  31-Oct-19 |        337        0.14       27.68
   1-Nov-19 |        337        0.14       27.82
   2-Nov-19 |        337        0.14       27.96
   3-Nov-19 |        337        0.14       28.09
   4-Nov-19 |        337        0.14       28.23
   5-Nov-19 |        337        0.14       28.37
   6-Nov-19 |        337        0.14       28.51
   7-Nov-19 |        337        0.14       28.65
   8-Nov-19 |        337        0.14       28.79
   9-Nov-19 |        337        0.14       28.93
  10-Nov-19 |        337        0.14       29.07
  11-Nov-19 |        337        0.14       29.21
  12-Nov-19 |        337        0.14       29.35
  13-Nov-19 |        337        0.14       29.49
  14-Nov-19 |        337        0.14       29.62
  15-Nov-19 |        337        0.14       29.76
  16-Nov-19 |        337        0.14       29.90
  17-Nov-19 |        337        0.14       30.04
  18-Nov-19 |        337        0.14       30.18
  19-Nov-19 |        337        0.14       30.32
  20-Nov-19 |        337        0.14       30.46
  21-Nov-19 |        337        0.14       30.60
  22-Nov-19 |        337        0.14       30.74
  23-Nov-19 |        337        0.14       30.88
  24-Nov-19 |        337        0.14       31.02
  25-Nov-19 |        337        0.14       31.15
  26-Nov-19 |        337        0.14       31.29
  27-Nov-19 |        337        0.14       31.43
  28-Nov-19 |        337        0.14       31.57
  29-Nov-19 |        337        0.14       31.71
  30-Nov-19 |        337        0.14       31.85
   1-Dec-19 |        337        0.14       31.99
   2-Dec-19 |        337        0.14       32.13
   3-Dec-19 |        337        0.14       32.27
   4-Dec-19 |        337        0.14       32.41
   5-Dec-19 |        337        0.14       32.55
   6-Dec-19 |        337        0.14       32.68
   7-Dec-19 |        337        0.14       32.82
   8-Dec-19 |        337        0.14       32.96
   9-Dec-19 |        337        0.14       33.10
  10-Dec-19 |        337        0.14       33.24
  11-Dec-19 |        337        0.14       33.38
  12-Dec-19 |        337        0.14       33.52
  13-Dec-19 |        337        0.14       33.66
  14-Dec-19 |        337        0.14       33.80
  15-Dec-19 |        337        0.14       33.94
  16-Dec-19 |        337        0.14       34.08
  17-Dec-19 |        337        0.14       34.21
  18-Dec-19 |        337        0.14       34.35
  19-Dec-19 |        337        0.14       34.49
  20-Dec-19 |        337        0.14       34.63
  21-Dec-19 |        337        0.14       34.77
  22-Dec-19 |        337        0.14       34.91
  23-Dec-19 |        337        0.14       35.05
  24-Dec-19 |        337        0.14       35.19
  25-Dec-19 |        337        0.14       35.33
  26-Dec-19 |        337        0.14       35.47
  27-Dec-19 |        337        0.14       35.61
  28-Dec-19 |        337        0.14       35.74
  29-Dec-19 |        337        0.14       35.88
  30-Dec-19 |        337        0.14       36.02
  31-Dec-19 |        337        0.14       36.16
   1-Jan-20 |        337        0.14       36.30
   2-Jan-20 |        337        0.14       36.44
   3-Jan-20 |        337        0.14       36.58
   4-Jan-20 |        337        0.14       36.72
   5-Jan-20 |        337        0.14       36.86
   6-Jan-20 |        337        0.14       37.00
   7-Jan-20 |        337        0.14       37.13
   8-Jan-20 |        337        0.14       37.27
   9-Jan-20 |        337        0.14       37.41
  10-Jan-20 |        337        0.14       37.55
  11-Jan-20 |        337        0.14       37.69
  12-Jan-20 |        337        0.14       37.83
  13-Jan-20 |        337        0.14       37.97
  14-Jan-20 |        337        0.14       38.11
  15-Jan-20 |        337        0.14       38.25
  16-Jan-20 |        337        0.14       38.39
  17-Jan-20 |        337        0.14       38.53
  18-Jan-20 |        337        0.14       38.66
  19-Jan-20 |        337        0.14       38.80
  20-Jan-20 |        337        0.14       38.94
  21-Jan-20 |        337        0.14       39.08
  22-Jan-20 |        337        0.14       39.22
  23-Jan-20 |        337        0.14       39.36
  24-Jan-20 |        337        0.14       39.50
  25-Jan-20 |        337        0.14       39.64
  26-Jan-20 |        337        0.14       39.78
  27-Jan-20 |        337        0.14       39.92
  28-Jan-20 |        337        0.14       40.06
  29-Jan-20 |        337        0.14       40.19
  30-Jan-20 |        337        0.14       40.33
  31-Jan-20 |        337        0.14       40.47
   1-Feb-20 |        337        0.14       40.61
   2-Feb-20 |        337        0.14       40.75
   3-Feb-20 |        337        0.14       40.89
   4-Feb-20 |        337        0.14       41.03
   5-Feb-20 |        337        0.14       41.17
   6-Feb-20 |        337        0.14       41.31
   7-Feb-20 |        337        0.14       41.45
   8-Feb-20 |        337        0.14       41.59
   9-Feb-20 |        337        0.14       41.72
  10-Feb-20 |        337        0.14       41.86
  11-Feb-20 |        337        0.14       42.00
  12-Feb-20 |        337        0.14       42.14
  13-Feb-20 |        337        0.14       42.28
  14-Feb-20 |        337        0.14       42.42
  15-Feb-20 |        337        0.14       42.56
  16-Feb-20 |        337        0.14       42.70
  17-Feb-20 |        337        0.14       42.84
  18-Feb-20 |        337        0.14       42.98
  19-Feb-20 |        337        0.14       43.12
  20-Feb-20 |        337        0.14       43.25
  21-Feb-20 |        337        0.14       43.39
  22-Feb-20 |        337        0.14       43.53
  23-Feb-20 |        337        0.14       43.67
  24-Feb-20 |        337        0.14       43.81
  25-Feb-20 |        337        0.14       43.95
  26-Feb-20 |        337        0.14       44.09
  27-Feb-20 |        337        0.14       44.23
  28-Feb-20 |        337        0.14       44.37
  29-Feb-20 |        337        0.14       44.51
   1-Mar-20 |        337        0.14       44.65
   2-Mar-20 |        337        0.14       44.78
   3-Mar-20 |        337        0.14       44.92
   4-Mar-20 |        337        0.14       45.06
   5-Mar-20 |        337        0.14       45.20
   6-Mar-20 |        337        0.14       45.34
   7-Mar-20 |        337        0.14       45.48
   8-Mar-20 |        337        0.14       45.62
   9-Mar-20 |        337        0.14       45.76
  10-Mar-20 |        337        0.14       45.90
  11-Mar-20 |        337        0.14       46.04
  12-Mar-20 |        337        0.14       46.18
  13-Mar-20 |        337        0.14       46.31
  14-Mar-20 |        337        0.14       46.45
  15-Mar-20 |        337        0.14       46.59
  16-Mar-20 |        337        0.14       46.73
  17-Mar-20 |        337        0.14       46.87
  18-Mar-20 |        337        0.14       47.01
  19-Mar-20 |        337        0.14       47.15
  20-Mar-20 |        337        0.14       47.29
  21-Mar-20 |        337        0.14       47.43
  22-Mar-20 |        337        0.14       47.57
  23-Mar-20 |        337        0.14       47.71
  24-Mar-20 |        337        0.14       47.84
  25-Mar-20 |        337        0.14       47.98
  26-Mar-20 |        337        0.14       48.12
  27-Mar-20 |        337        0.14       48.26
  28-Mar-20 |        337        0.14       48.40
  29-Mar-20 |        337        0.14       48.54
  30-Mar-20 |        337        0.14       48.68
  31-Mar-20 |        337        0.14       48.82
   1-Apr-20 |        337        0.14       48.96
   2-Apr-20 |        337        0.14       49.10
   3-Apr-20 |        337        0.14       49.24
   4-Apr-20 |        337        0.14       49.37
   5-Apr-20 |        337        0.14       49.51
   6-Apr-20 |        337        0.14       49.65
   7-Apr-20 |        337        0.14       49.79
   8-Apr-20 |        337        0.14       49.93
   9-Apr-20 |        337        0.14       50.07
  10-Apr-20 |        337        0.14       50.21
  11-Apr-20 |        337        0.14       50.35
  12-Apr-20 |        337        0.14       50.49
  13-Apr-20 |        337        0.14       50.63
  14-Apr-20 |        337        0.14       50.76
  15-Apr-20 |        337        0.14       50.90
  16-Apr-20 |        337        0.14       51.04
  17-Apr-20 |        337        0.14       51.18
  18-Apr-20 |        337        0.14       51.32
  19-Apr-20 |        337        0.14       51.46
  20-Apr-20 |        337        0.14       51.60
  21-Apr-20 |        337        0.14       51.74
  22-Apr-20 |        337        0.14       51.88
  23-Apr-20 |        337        0.14       52.02
  24-Apr-20 |        337        0.14       52.16
  25-Apr-20 |        337        0.14       52.29
  26-Apr-20 |        337        0.14       52.43
  27-Apr-20 |        337        0.14       52.57
  28-Apr-20 |        337        0.14       52.71
  29-Apr-20 |        337        0.14       52.85
  30-Apr-20 |        337        0.14       52.99
   1-May-20 |        337        0.14       53.13
   2-May-20 |        337        0.14       53.27
   3-May-20 |        337        0.14       53.41
   4-May-20 |        337        0.14       53.55
   5-May-20 |        337        0.14       53.69
   6-May-20 |        337        0.14       53.82
   7-May-20 |        337        0.14       53.96
   8-May-20 |        337        0.14       54.10
   9-May-20 |        337        0.14       54.24
  10-May-20 |        337        0.14       54.38
  11-May-20 |        337        0.14       54.52
  12-May-20 |        337        0.14       54.66
  13-May-20 |        337        0.14       54.80
  14-May-20 |        337        0.14       54.94
  15-May-20 |        337        0.14       55.08
  16-May-20 |        337        0.14       55.22
  17-May-20 |        337        0.14       55.35
  18-May-20 |        337        0.14       55.49
  19-May-20 |        337        0.14       55.63
  20-May-20 |        337        0.14       55.77
  21-May-20 |        337        0.14       55.91
  22-May-20 |        337        0.14       56.05
  23-May-20 |        337        0.14       56.19
  24-May-20 |        337        0.14       56.33
  25-May-20 |        337        0.14       56.47
  26-May-20 |        337        0.14       56.61
  27-May-20 |        337        0.14       56.75
  28-May-20 |        337        0.14       56.88
  29-May-20 |        337        0.14       57.02
  30-May-20 |        337        0.14       57.16
  31-May-20 |        337        0.14       57.30
   1-Jun-20 |        337        0.14       57.44
   2-Jun-20 |        337        0.14       57.58
   3-Jun-20 |        337        0.14       57.72
   4-Jun-20 |        337        0.14       57.86
   5-Jun-20 |        337        0.14       58.00
   6-Jun-20 |        337        0.14       58.14
   7-Jun-20 |        337        0.14       58.28
   8-Jun-20 |        337        0.14       58.41
   9-Jun-20 |        337        0.14       58.55
  10-Jun-20 |        337        0.14       58.69
  11-Jun-20 |        337        0.14       58.83
  12-Jun-20 |        337        0.14       58.97
  13-Jun-20 |        337        0.14       59.11
  14-Jun-20 |        337        0.14       59.25
  15-Jun-20 |        337        0.14       59.39
  16-Jun-20 |        337        0.14       59.53
  17-Jun-20 |        337        0.14       59.67
  18-Jun-20 |        337        0.14       59.81
  19-Jun-20 |        337        0.14       59.94
  20-Jun-20 |        337        0.14       60.08
  21-Jun-20 |        337        0.14       60.22
  22-Jun-20 |        337        0.14       60.36
  23-Jun-20 |        337        0.14       60.50
  24-Jun-20 |        337        0.14       60.64
  25-Jun-20 |        337        0.14       60.78
  26-Jun-20 |        337        0.14       60.92
  27-Jun-20 |        337        0.14       61.06
  28-Jun-20 |        337        0.14       61.20
  29-Jun-20 |        337        0.14       61.34
  30-Jun-20 |        337        0.14       61.47
   1-Jul-20 |        337        0.14       61.61
   2-Jul-20 |        337        0.14       61.75
   3-Jul-20 |        337        0.14       61.89
   4-Jul-20 |        337        0.14       62.03
   5-Jul-20 |        337        0.14       62.17
   6-Jul-20 |        337        0.14       62.31
   7-Jul-20 |        337        0.14       62.45
   8-Jul-20 |        337        0.14       62.59
   9-Jul-20 |        337        0.14       62.73
  10-Jul-20 |        337        0.14       62.87
  11-Jul-20 |        337        0.14       63.00
  12-Jul-20 |        337        0.14       63.14
  13-Jul-20 |        337        0.14       63.28
  14-Jul-20 |        337        0.14       63.42
  15-Jul-20 |        337        0.14       63.56
  16-Jul-20 |        337        0.14       63.70
  17-Jul-20 |        337        0.14       63.84
  18-Jul-20 |        337        0.14       63.98
  19-Jul-20 |        337        0.14       64.12
  20-Jul-20 |        337        0.14       64.26
  21-Jul-20 |        337        0.14       64.39
  22-Jul-20 |        337        0.14       64.53
  23-Jul-20 |        337        0.14       64.67
  24-Jul-20 |        337        0.14       64.81
  25-Jul-20 |        337        0.14       64.95
  26-Jul-20 |        337        0.14       65.09
  27-Jul-20 |        337        0.14       65.23
  28-Jul-20 |        337        0.14       65.37
  29-Jul-20 |        337        0.14       65.51
  30-Jul-20 |        337        0.14       65.65
  31-Jul-20 |        337        0.14       65.79
   1-Aug-20 |        337        0.14       65.92
   2-Aug-20 |        337        0.14       66.06
   3-Aug-20 |        337        0.14       66.20
   4-Aug-20 |        337        0.14       66.34
   5-Aug-20 |        337        0.14       66.48
   6-Aug-20 |        337        0.14       66.62
   7-Aug-20 |        337        0.14       66.76
   8-Aug-20 |        337        0.14       66.90
   9-Aug-20 |        337        0.14       67.04
  10-Aug-20 |        337        0.14       67.18
  11-Aug-20 |        337        0.14       67.32
  12-Aug-20 |        337        0.14       67.45
  13-Aug-20 |        337        0.14       67.59
  14-Aug-20 |        337        0.14       67.73
  15-Aug-20 |        337        0.14       67.87
  16-Aug-20 |        337        0.14       68.01
  17-Aug-20 |        337        0.14       68.15
  18-Aug-20 |        337        0.14       68.29
  19-Aug-20 |        337        0.14       68.43
  20-Aug-20 |        337        0.14       68.57
  21-Aug-20 |        337        0.14       68.71
  22-Aug-20 |        337        0.14       68.85
  23-Aug-20 |        337        0.14       68.98
  24-Aug-20 |        337        0.14       69.12
  25-Aug-20 |        337        0.14       69.26
  26-Aug-20 |        337        0.14       69.40
  27-Aug-20 |        337        0.14       69.54
  28-Aug-20 |        337        0.14       69.68
  29-Aug-20 |        337        0.14       69.82
  30-Aug-20 |        337        0.14       69.96
  31-Aug-20 |        337        0.14       70.10
   1-Sep-20 |        337        0.14       70.24
   2-Sep-20 |        337        0.14       70.38
   3-Sep-20 |        337        0.14       70.51
   4-Sep-20 |        337        0.14       70.65
   5-Sep-20 |        337        0.14       70.79
   6-Sep-20 |        337        0.14       70.93
   7-Sep-20 |        337        0.14       71.07
   8-Sep-20 |        337        0.14       71.21
   9-Sep-20 |        337        0.14       71.35
  10-Sep-20 |        337        0.14       71.49
  11-Sep-20 |        337        0.14       71.63
  12-Sep-20 |        337        0.14       71.77
  13-Sep-20 |        337        0.14       71.91
  14-Sep-20 |        337        0.14       72.04
  15-Sep-20 |        337        0.14       72.18
  16-Sep-20 |        337        0.14       72.32
  17-Sep-20 |        337        0.14       72.46
  18-Sep-20 |        337        0.14       72.60
  19-Sep-20 |        337        0.14       72.74
  20-Sep-20 |        337        0.14       72.88
  21-Sep-20 |        337        0.14       73.02
  22-Sep-20 |        337        0.14       73.16
  23-Sep-20 |        337        0.14       73.30
  24-Sep-20 |        337        0.14       73.44
  25-Sep-20 |        337        0.14       73.57
  26-Sep-20 |        337        0.14       73.71
  27-Sep-20 |        337        0.14       73.85
  28-Sep-20 |        337        0.14       73.99
  29-Sep-20 |        337        0.14       74.13
  30-Sep-20 |        337        0.14       74.27
   1-Oct-20 |        337        0.14       74.41
   2-Oct-20 |        337        0.14       74.55
   3-Oct-20 |        337        0.14       74.69
   4-Oct-20 |        337        0.14       74.83
   5-Oct-20 |        337        0.14       74.97
   6-Oct-20 |        337        0.14       75.10
   7-Oct-20 |        337        0.14       75.24
   8-Oct-20 |        337        0.14       75.38
   9-Oct-20 |        337        0.14       75.52
  10-Oct-20 |        337        0.14       75.66
  11-Oct-20 |        337        0.14       75.80
  12-Oct-20 |        337        0.14       75.94
  13-Oct-20 |        337        0.14       76.08
  14-Oct-20 |        337        0.14       76.22
  15-Oct-20 |        337        0.14       76.36
  16-Oct-20 |        337        0.14       76.50
  17-Oct-20 |        337        0.14       76.63
  18-Oct-20 |        337        0.14       76.77
  19-Oct-20 |        337        0.14       76.91
  20-Oct-20 |        337        0.14       77.05
  21-Oct-20 |        337        0.14       77.19
  22-Oct-20 |        337        0.14       77.33
  23-Oct-20 |        337        0.14       77.47
  24-Oct-20 |        337        0.14       77.61
  25-Oct-20 |        337        0.14       77.75
  26-Oct-20 |        337        0.14       77.89
  27-Oct-20 |        337        0.14       78.03
  28-Oct-20 |        337        0.14       78.16
  29-Oct-20 |        337        0.14       78.30
  30-Oct-20 |        337        0.14       78.44
  31-Oct-20 |        337        0.14       78.58
   1-Nov-20 |        337        0.14       78.72
   2-Nov-20 |        337        0.14       78.86
   3-Nov-20 |        337        0.14       79.00
   4-Nov-20 |        337        0.14       79.14
   5-Nov-20 |        337        0.14       79.28
   6-Nov-20 |        337        0.14       79.42
   7-Nov-20 |        337        0.14       79.55
   8-Nov-20 |        337        0.14       79.69
   9-Nov-20 |        337        0.14       79.83
  10-Nov-20 |        337        0.14       79.97
  11-Nov-20 |        337        0.14       80.11
  12-Nov-20 |        337        0.14       80.25
  13-Nov-20 |        337        0.14       80.39
  14-Nov-20 |        337        0.14       80.53
  15-Nov-20 |        337        0.14       80.67
  16-Nov-20 |        337        0.14       80.81
  17-Nov-20 |        337        0.14       80.95
  18-Nov-20 |        337        0.14       81.08
  19-Nov-20 |        337        0.14       81.22
  20-Nov-20 |        337        0.14       81.36
  21-Nov-20 |        337        0.14       81.50
  22-Nov-20 |        337        0.14       81.64
  23-Nov-20 |        337        0.14       81.78
  24-Nov-20 |        337        0.14       81.92
  25-Nov-20 |        337        0.14       82.06
  26-Nov-20 |        337        0.14       82.20
  27-Nov-20 |        337        0.14       82.34
  28-Nov-20 |        337        0.14       82.48
  29-Nov-20 |        337        0.14       82.61
  30-Nov-20 |        337        0.14       82.75
   1-Dec-20 |        337        0.14       82.89
   2-Dec-20 |        337        0.14       83.03
   3-Dec-20 |        337        0.14       83.17
   4-Dec-20 |        337        0.14       83.31
   5-Dec-20 |        337        0.14       83.45
   6-Dec-20 |        337        0.14       83.59
   7-Dec-20 |        337        0.14       83.73
   8-Dec-20 |        337        0.14       83.87
   9-Dec-20 |        337        0.14       84.01
  10-Dec-20 |        337        0.14       84.14
  11-Dec-20 |        337        0.14       84.28
  12-Dec-20 |        337        0.14       84.42
  13-Dec-20 |        337        0.14       84.56
  14-Dec-20 |        337        0.14       84.70
  15-Dec-20 |        337        0.14       84.84
  16-Dec-20 |        337        0.14       84.98
  17-Dec-20 |        337        0.14       85.12
  18-Dec-20 |        337        0.14       85.26
  19-Dec-20 |        337        0.14       85.40
  20-Dec-20 |        337        0.14       85.54
  21-Dec-20 |        337        0.14       85.67
  22-Dec-20 |        337        0.14       85.81
  23-Dec-20 |        337        0.14       85.95
  24-Dec-20 |        337        0.14       86.09
  25-Dec-20 |        337        0.14       86.23
  26-Dec-20 |        337        0.14       86.37
  27-Dec-20 |        337        0.14       86.51
  28-Dec-20 |        337        0.14       86.65
  29-Dec-20 |        337        0.14       86.79
  30-Dec-20 |        337        0.14       86.93
  31-Dec-20 |        337        0.14       87.07
   1-Jan-21 |        337        0.14       87.20
   2-Jan-21 |        337        0.14       87.34
   3-Jan-21 |        337        0.14       87.48
   4-Jan-21 |        337        0.14       87.62
   5-Jan-21 |        337        0.14       87.76
   6-Jan-21 |        337        0.14       87.90
   7-Jan-21 |        337        0.14       88.04
   8-Jan-21 |        337        0.14       88.18
   9-Jan-21 |        337        0.14       88.32
  10-Jan-21 |        337        0.14       88.46
  11-Jan-21 |        337        0.14       88.60
  12-Jan-21 |        337        0.14       88.73
  13-Jan-21 |        337        0.14       88.87
  14-Jan-21 |        337        0.14       89.01
  15-Jan-21 |        337        0.14       89.15
  16-Jan-21 |        337        0.14       89.29
  17-Jan-21 |        337        0.14       89.43
  18-Jan-21 |        337        0.14       89.57
  19-Jan-21 |        337        0.14       89.71
  20-Jan-21 |        337        0.14       89.85
  21-Jan-21 |        337        0.14       89.99
  22-Jan-21 |        337        0.14       90.13
  23-Jan-21 |        337        0.14       90.26
  24-Jan-21 |        337        0.14       90.40
  25-Jan-21 |        337        0.14       90.54
  26-Jan-21 |        337        0.14       90.68
  27-Jan-21 |        337        0.14       90.82
  28-Jan-21 |        337        0.14       90.96
  29-Jan-21 |        337        0.14       91.10
  30-Jan-21 |        337        0.14       91.24
  31-Jan-21 |        337        0.14       91.38
   1-Feb-21 |        337        0.14       91.52
   2-Feb-21 |        337        0.14       91.66
   3-Feb-21 |        337        0.14       91.79
   4-Feb-21 |        337        0.14       91.93
   5-Feb-21 |        337        0.14       92.07
   6-Feb-21 |        337        0.14       92.21
   7-Feb-21 |        337        0.14       92.35
   8-Feb-21 |        337        0.14       92.49
   9-Feb-21 |        337        0.14       92.63
  10-Feb-21 |        337        0.14       92.77
  11-Feb-21 |        337        0.14       92.91
  12-Feb-21 |        337        0.14       93.05
  13-Feb-21 |        337        0.14       93.18
  14-Feb-21 |        337        0.14       93.32
  15-Feb-21 |        337        0.14       93.46
  16-Feb-21 |        337        0.14       93.60
  17-Feb-21 |        337        0.14       93.74
  18-Feb-21 |        337        0.14       93.88
  19-Feb-21 |        337        0.14       94.02
  20-Feb-21 |        337        0.14       94.16
  21-Feb-21 |        337        0.14       94.30
  22-Feb-21 |        337        0.14       94.44
  23-Feb-21 |        337        0.14       94.58
  24-Feb-21 |        337        0.14       94.71
  25-Feb-21 |        337        0.14       94.85
  26-Feb-21 |        337        0.14       94.99
  27-Feb-21 |        337        0.14       95.13
  28-Feb-21 |        337        0.14       95.27
   1-Mar-21 |        337        0.14       95.41
   2-Mar-21 |        337        0.14       95.55
   3-Mar-21 |        337        0.14       95.69
   4-Mar-21 |        337        0.14       95.83
   5-Mar-21 |        337        0.14       95.97
   6-Mar-21 |        337        0.14       96.11
   7-Mar-21 |        337        0.14       96.24
   8-Mar-21 |        337        0.14       96.38
   9-Mar-21 |        337        0.14       96.52
  10-Mar-21 |        337        0.14       96.66
  11-Mar-21 |        337        0.14       96.80
  12-Mar-21 |        337        0.14       96.94
  13-Mar-21 |        337        0.14       97.08
  14-Mar-21 |        337        0.14       97.22
  15-Mar-21 |        337        0.14       97.36
  16-Mar-21 |        337        0.14       97.50
  17-Mar-21 |        337        0.14       97.64
  18-Mar-21 |        337        0.14       97.77
  19-Mar-21 |        337        0.14       97.91
  20-Mar-21 |        337        0.14       98.05
  21-Mar-21 |        337        0.14       98.19
  22-Mar-21 |        337        0.14       98.33
  23-Mar-21 |        337        0.14       98.47
  24-Mar-21 |        337        0.14       98.61
  25-Mar-21 |        337        0.14       98.75
  26-Mar-21 |        337        0.14       98.89
  27-Mar-21 |        337        0.14       99.03
  28-Mar-21 |        337        0.14       99.17
  29-Mar-21 |        337        0.14       99.30
  30-Mar-21 |        337        0.14       99.44
  31-Mar-21 |        337        0.14       99.58
   1-Apr-21 |        337        0.14       99.72
   2-Apr-21 |        337        0.14       99.86
   3-Apr-21 |        337        0.14      100.00
------------+-----------------------------------
      Total |    242,303      100.00

. ** 242,303 Observations. 337 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ** Generate a week variable
. drop week

. gen int week = floor((date-td(31dec2018))/7)+1

. la var week "Week"

. 
. ** Generate a month variable which goes from the 16th of each month to the 15th of the next month. 
. ** This definition of month aligns with the implementation of ETS market in its initial Stages. 
. ** Nick Cox's code:
. drop month16

. gen month16 = date if day(date) == 16
(234,215 missing values generated)

. //      replace month16 = mdy(1, 16, 2019) in 1
. replace month16 = month16[_n-1] if missing(month16)
(234,215 real changes made)

. la var month16 "Month, defined as 16th of this month to 15th of next month"

. gen month16_sif = month16

. format month16 %tddd-Mon-YY

. la var month16_sif "[SIF] Month-year. For convenience."

. order month16_sif, a(month16)

. sort composite_id date

. ** Check days in each month for one device. Looks good.
. *tab month16 if composite_id == "GJSRT100740111"
. 
. ** Generate Dummy for Interregnum period of market
. ** Covid lockdown -- 23 March 2020 to 11 October 2021. 
. ** Mock-III started on 12 October 2021.
. gen D_interregnum_week = week >= 65 & week <= 93

. replace D_interregnum_week =1 if week == 99 | week == 100
(4,718 real changes made)

. la var D_interregnum_week ///
>         "[Week-level] =1 if Interregnum due to Covid-19 lockdown, zero otherwise."

. 
. drop extinct_with_assignment removed_from_sample comment

. 
. ** Remove plants that have no observation from 16-Apr-19 to 03-Apr-21.
. bysort gpcb_id: egen pct_report = mean(!missing(pm_mass_rule0)) if ///
>         month16 >= date("2019jul16", "YMD") & D_interregnum_week == 0
(103,796 missing values generated)

. sort composite_id date

. bysort gpcb_id: egen pct_report_1 = mean(pct_report)

. drop if pct_report_1 == 0
(19,413 observations deleted)

. drop pct_report pct_report_1

. sort composite_id date  

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        310        0.14        0.14
  17-Apr-19 |        310        0.14        0.28
  18-Apr-19 |        310        0.14        0.42
  19-Apr-19 |        310        0.14        0.56
  20-Apr-19 |        310        0.14        0.70
  21-Apr-19 |        310        0.14        0.83
  22-Apr-19 |        310        0.14        0.97
  23-Apr-19 |        310        0.14        1.11
  24-Apr-19 |        310        0.14        1.25
  25-Apr-19 |        310        0.14        1.39
  26-Apr-19 |        310        0.14        1.53
  27-Apr-19 |        310        0.14        1.67
  28-Apr-19 |        310        0.14        1.81
  29-Apr-19 |        310        0.14        1.95
  30-Apr-19 |        310        0.14        2.09
   1-May-19 |        310        0.14        2.23
   2-May-19 |        310        0.14        2.36
   3-May-19 |        310        0.14        2.50
   4-May-19 |        310        0.14        2.64
   5-May-19 |        310        0.14        2.78
   6-May-19 |        310        0.14        2.92
   7-May-19 |        310        0.14        3.06
   8-May-19 |        310        0.14        3.20
   9-May-19 |        310        0.14        3.34
  10-May-19 |        310        0.14        3.48
  11-May-19 |        310        0.14        3.62
  12-May-19 |        310        0.14        3.76
  13-May-19 |        310        0.14        3.89
  14-May-19 |        310        0.14        4.03
  15-May-19 |        310        0.14        4.17
  16-May-19 |        310        0.14        4.31
  17-May-19 |        310        0.14        4.45
  18-May-19 |        310        0.14        4.59
  19-May-19 |        310        0.14        4.73
  20-May-19 |        310        0.14        4.87
  21-May-19 |        310        0.14        5.01
  22-May-19 |        310        0.14        5.15
  23-May-19 |        310        0.14        5.29
  24-May-19 |        310        0.14        5.42
  25-May-19 |        310        0.14        5.56
  26-May-19 |        310        0.14        5.70
  27-May-19 |        310        0.14        5.84
  28-May-19 |        310        0.14        5.98
  29-May-19 |        310        0.14        6.12
  30-May-19 |        310        0.14        6.26
  31-May-19 |        310        0.14        6.40
   1-Jun-19 |        310        0.14        6.54
   2-Jun-19 |        310        0.14        6.68
   3-Jun-19 |        310        0.14        6.82
   4-Jun-19 |        310        0.14        6.95
   5-Jun-19 |        310        0.14        7.09
   6-Jun-19 |        310        0.14        7.23
   7-Jun-19 |        310        0.14        7.37
   8-Jun-19 |        310        0.14        7.51
   9-Jun-19 |        310        0.14        7.65
  10-Jun-19 |        310        0.14        7.79
  11-Jun-19 |        310        0.14        7.93
  12-Jun-19 |        310        0.14        8.07
  13-Jun-19 |        310        0.14        8.21
  14-Jun-19 |        310        0.14        8.34
  15-Jun-19 |        310        0.14        8.48
  16-Jun-19 |        310        0.14        8.62
  17-Jun-19 |        310        0.14        8.76
  18-Jun-19 |        310        0.14        8.90
  19-Jun-19 |        310        0.14        9.04
  20-Jun-19 |        310        0.14        9.18
  21-Jun-19 |        310        0.14        9.32
  22-Jun-19 |        310        0.14        9.46
  23-Jun-19 |        310        0.14        9.60
  24-Jun-19 |        310        0.14        9.74
  25-Jun-19 |        310        0.14        9.87
  26-Jun-19 |        310        0.14       10.01
  27-Jun-19 |        310        0.14       10.15
  28-Jun-19 |        310        0.14       10.29
  29-Jun-19 |        310        0.14       10.43
  30-Jun-19 |        310        0.14       10.57
   1-Jul-19 |        310        0.14       10.71
   2-Jul-19 |        310        0.14       10.85
   3-Jul-19 |        310        0.14       10.99
   4-Jul-19 |        310        0.14       11.13
   5-Jul-19 |        310        0.14       11.27
   6-Jul-19 |        310        0.14       11.40
   7-Jul-19 |        310        0.14       11.54
   8-Jul-19 |        310        0.14       11.68
   9-Jul-19 |        310        0.14       11.82
  10-Jul-19 |        310        0.14       11.96
  11-Jul-19 |        310        0.14       12.10
  12-Jul-19 |        310        0.14       12.24
  13-Jul-19 |        310        0.14       12.38
  14-Jul-19 |        310        0.14       12.52
  15-Jul-19 |        310        0.14       12.66
  16-Jul-19 |        310        0.14       12.80
  17-Jul-19 |        310        0.14       12.93
  18-Jul-19 |        310        0.14       13.07
  19-Jul-19 |        310        0.14       13.21
  20-Jul-19 |        310        0.14       13.35
  21-Jul-19 |        310        0.14       13.49
  22-Jul-19 |        310        0.14       13.63
  23-Jul-19 |        310        0.14       13.77
  24-Jul-19 |        310        0.14       13.91
  25-Jul-19 |        310        0.14       14.05
  26-Jul-19 |        310        0.14       14.19
  27-Jul-19 |        310        0.14       14.33
  28-Jul-19 |        310        0.14       14.46
  29-Jul-19 |        310        0.14       14.60
  30-Jul-19 |        310        0.14       14.74
  31-Jul-19 |        310        0.14       14.88
   1-Aug-19 |        310        0.14       15.02
   2-Aug-19 |        310        0.14       15.16
   3-Aug-19 |        310        0.14       15.30
   4-Aug-19 |        310        0.14       15.44
   5-Aug-19 |        310        0.14       15.58
   6-Aug-19 |        310        0.14       15.72
   7-Aug-19 |        310        0.14       15.86
   8-Aug-19 |        310        0.14       15.99
   9-Aug-19 |        310        0.14       16.13
  10-Aug-19 |        310        0.14       16.27
  11-Aug-19 |        310        0.14       16.41
  12-Aug-19 |        310        0.14       16.55
  13-Aug-19 |        310        0.14       16.69
  14-Aug-19 |        310        0.14       16.83
  15-Aug-19 |        310        0.14       16.97
  16-Aug-19 |        310        0.14       17.11
  17-Aug-19 |        310        0.14       17.25
  18-Aug-19 |        310        0.14       17.39
  19-Aug-19 |        310        0.14       17.52
  20-Aug-19 |        310        0.14       17.66
  21-Aug-19 |        310        0.14       17.80
  22-Aug-19 |        310        0.14       17.94
  23-Aug-19 |        310        0.14       18.08
  24-Aug-19 |        310        0.14       18.22
  25-Aug-19 |        310        0.14       18.36
  26-Aug-19 |        310        0.14       18.50
  27-Aug-19 |        310        0.14       18.64
  28-Aug-19 |        310        0.14       18.78
  29-Aug-19 |        310        0.14       18.92
  30-Aug-19 |        310        0.14       19.05
  31-Aug-19 |        310        0.14       19.19
   1-Sep-19 |        310        0.14       19.33
   2-Sep-19 |        310        0.14       19.47
   3-Sep-19 |        310        0.14       19.61
   4-Sep-19 |        310        0.14       19.75
   5-Sep-19 |        310        0.14       19.89
   6-Sep-19 |        310        0.14       20.03
   7-Sep-19 |        310        0.14       20.17
   8-Sep-19 |        310        0.14       20.31
   9-Sep-19 |        310        0.14       20.45
  10-Sep-19 |        310        0.14       20.58
  11-Sep-19 |        310        0.14       20.72
  12-Sep-19 |        310        0.14       20.86
  13-Sep-19 |        310        0.14       21.00
  14-Sep-19 |        310        0.14       21.14
  15-Sep-19 |        310        0.14       21.28
  16-Sep-19 |        310        0.14       21.42
  17-Sep-19 |        310        0.14       21.56
  18-Sep-19 |        310        0.14       21.70
  19-Sep-19 |        310        0.14       21.84
  20-Sep-19 |        310        0.14       21.97
  21-Sep-19 |        310        0.14       22.11
  22-Sep-19 |        310        0.14       22.25
  23-Sep-19 |        310        0.14       22.39
  24-Sep-19 |        310        0.14       22.53
  25-Sep-19 |        310        0.14       22.67
  26-Sep-19 |        310        0.14       22.81
  27-Sep-19 |        310        0.14       22.95
  28-Sep-19 |        310        0.14       23.09
  29-Sep-19 |        310        0.14       23.23
  30-Sep-19 |        310        0.14       23.37
   1-Oct-19 |        310        0.14       23.50
   2-Oct-19 |        310        0.14       23.64
   3-Oct-19 |        310        0.14       23.78
   4-Oct-19 |        310        0.14       23.92
   5-Oct-19 |        310        0.14       24.06
   6-Oct-19 |        310        0.14       24.20
   7-Oct-19 |        310        0.14       24.34
   8-Oct-19 |        310        0.14       24.48
   9-Oct-19 |        310        0.14       24.62
  10-Oct-19 |        310        0.14       24.76
  11-Oct-19 |        310        0.14       24.90
  12-Oct-19 |        310        0.14       25.03
  13-Oct-19 |        310        0.14       25.17
  14-Oct-19 |        310        0.14       25.31
  15-Oct-19 |        310        0.14       25.45
  16-Oct-19 |        310        0.14       25.59
  17-Oct-19 |        310        0.14       25.73
  18-Oct-19 |        310        0.14       25.87
  19-Oct-19 |        310        0.14       26.01
  20-Oct-19 |        310        0.14       26.15
  21-Oct-19 |        310        0.14       26.29
  22-Oct-19 |        310        0.14       26.43
  23-Oct-19 |        310        0.14       26.56
  24-Oct-19 |        310        0.14       26.70
  25-Oct-19 |        310        0.14       26.84
  26-Oct-19 |        310        0.14       26.98
  27-Oct-19 |        310        0.14       27.12
  28-Oct-19 |        310        0.14       27.26
  29-Oct-19 |        310        0.14       27.40
  30-Oct-19 |        310        0.14       27.54
  31-Oct-19 |        310        0.14       27.68
   1-Nov-19 |        310        0.14       27.82
   2-Nov-19 |        310        0.14       27.96
   3-Nov-19 |        310        0.14       28.09
   4-Nov-19 |        310        0.14       28.23
   5-Nov-19 |        310        0.14       28.37
   6-Nov-19 |        310        0.14       28.51
   7-Nov-19 |        310        0.14       28.65
   8-Nov-19 |        310        0.14       28.79
   9-Nov-19 |        310        0.14       28.93
  10-Nov-19 |        310        0.14       29.07
  11-Nov-19 |        310        0.14       29.21
  12-Nov-19 |        310        0.14       29.35
  13-Nov-19 |        310        0.14       29.49
  14-Nov-19 |        310        0.14       29.62
  15-Nov-19 |        310        0.14       29.76
  16-Nov-19 |        310        0.14       29.90
  17-Nov-19 |        310        0.14       30.04
  18-Nov-19 |        310        0.14       30.18
  19-Nov-19 |        310        0.14       30.32
  20-Nov-19 |        310        0.14       30.46
  21-Nov-19 |        310        0.14       30.60
  22-Nov-19 |        310        0.14       30.74
  23-Nov-19 |        310        0.14       30.88
  24-Nov-19 |        310        0.14       31.02
  25-Nov-19 |        310        0.14       31.15
  26-Nov-19 |        310        0.14       31.29
  27-Nov-19 |        310        0.14       31.43
  28-Nov-19 |        310        0.14       31.57
  29-Nov-19 |        310        0.14       31.71
  30-Nov-19 |        310        0.14       31.85
   1-Dec-19 |        310        0.14       31.99
   2-Dec-19 |        310        0.14       32.13
   3-Dec-19 |        310        0.14       32.27
   4-Dec-19 |        310        0.14       32.41
   5-Dec-19 |        310        0.14       32.55
   6-Dec-19 |        310        0.14       32.68
   7-Dec-19 |        310        0.14       32.82
   8-Dec-19 |        310        0.14       32.96
   9-Dec-19 |        310        0.14       33.10
  10-Dec-19 |        310        0.14       33.24
  11-Dec-19 |        310        0.14       33.38
  12-Dec-19 |        310        0.14       33.52
  13-Dec-19 |        310        0.14       33.66
  14-Dec-19 |        310        0.14       33.80
  15-Dec-19 |        310        0.14       33.94
  16-Dec-19 |        310        0.14       34.08
  17-Dec-19 |        310        0.14       34.21
  18-Dec-19 |        310        0.14       34.35
  19-Dec-19 |        310        0.14       34.49
  20-Dec-19 |        310        0.14       34.63
  21-Dec-19 |        310        0.14       34.77
  22-Dec-19 |        310        0.14       34.91
  23-Dec-19 |        310        0.14       35.05
  24-Dec-19 |        310        0.14       35.19
  25-Dec-19 |        310        0.14       35.33
  26-Dec-19 |        310        0.14       35.47
  27-Dec-19 |        310        0.14       35.61
  28-Dec-19 |        310        0.14       35.74
  29-Dec-19 |        310        0.14       35.88
  30-Dec-19 |        310        0.14       36.02
  31-Dec-19 |        310        0.14       36.16
   1-Jan-20 |        310        0.14       36.30
   2-Jan-20 |        310        0.14       36.44
   3-Jan-20 |        310        0.14       36.58
   4-Jan-20 |        310        0.14       36.72
   5-Jan-20 |        310        0.14       36.86
   6-Jan-20 |        310        0.14       37.00
   7-Jan-20 |        310        0.14       37.13
   8-Jan-20 |        310        0.14       37.27
   9-Jan-20 |        310        0.14       37.41
  10-Jan-20 |        310        0.14       37.55
  11-Jan-20 |        310        0.14       37.69
  12-Jan-20 |        310        0.14       37.83
  13-Jan-20 |        310        0.14       37.97
  14-Jan-20 |        310        0.14       38.11
  15-Jan-20 |        310        0.14       38.25
  16-Jan-20 |        310        0.14       38.39
  17-Jan-20 |        310        0.14       38.53
  18-Jan-20 |        310        0.14       38.66
  19-Jan-20 |        310        0.14       38.80
  20-Jan-20 |        310        0.14       38.94
  21-Jan-20 |        310        0.14       39.08
  22-Jan-20 |        310        0.14       39.22
  23-Jan-20 |        310        0.14       39.36
  24-Jan-20 |        310        0.14       39.50
  25-Jan-20 |        310        0.14       39.64
  26-Jan-20 |        310        0.14       39.78
  27-Jan-20 |        310        0.14       39.92
  28-Jan-20 |        310        0.14       40.06
  29-Jan-20 |        310        0.14       40.19
  30-Jan-20 |        310        0.14       40.33
  31-Jan-20 |        310        0.14       40.47
   1-Feb-20 |        310        0.14       40.61
   2-Feb-20 |        310        0.14       40.75
   3-Feb-20 |        310        0.14       40.89
   4-Feb-20 |        310        0.14       41.03
   5-Feb-20 |        310        0.14       41.17
   6-Feb-20 |        310        0.14       41.31
   7-Feb-20 |        310        0.14       41.45
   8-Feb-20 |        310        0.14       41.59
   9-Feb-20 |        310        0.14       41.72
  10-Feb-20 |        310        0.14       41.86
  11-Feb-20 |        310        0.14       42.00
  12-Feb-20 |        310        0.14       42.14
  13-Feb-20 |        310        0.14       42.28
  14-Feb-20 |        310        0.14       42.42
  15-Feb-20 |        310        0.14       42.56
  16-Feb-20 |        310        0.14       42.70
  17-Feb-20 |        310        0.14       42.84
  18-Feb-20 |        310        0.14       42.98
  19-Feb-20 |        310        0.14       43.12
  20-Feb-20 |        310        0.14       43.25
  21-Feb-20 |        310        0.14       43.39
  22-Feb-20 |        310        0.14       43.53
  23-Feb-20 |        310        0.14       43.67
  24-Feb-20 |        310        0.14       43.81
  25-Feb-20 |        310        0.14       43.95
  26-Feb-20 |        310        0.14       44.09
  27-Feb-20 |        310        0.14       44.23
  28-Feb-20 |        310        0.14       44.37
  29-Feb-20 |        310        0.14       44.51
   1-Mar-20 |        310        0.14       44.65
   2-Mar-20 |        310        0.14       44.78
   3-Mar-20 |        310        0.14       44.92
   4-Mar-20 |        310        0.14       45.06
   5-Mar-20 |        310        0.14       45.20
   6-Mar-20 |        310        0.14       45.34
   7-Mar-20 |        310        0.14       45.48
   8-Mar-20 |        310        0.14       45.62
   9-Mar-20 |        310        0.14       45.76
  10-Mar-20 |        310        0.14       45.90
  11-Mar-20 |        310        0.14       46.04
  12-Mar-20 |        310        0.14       46.18
  13-Mar-20 |        310        0.14       46.31
  14-Mar-20 |        310        0.14       46.45
  15-Mar-20 |        310        0.14       46.59
  16-Mar-20 |        310        0.14       46.73
  17-Mar-20 |        310        0.14       46.87
  18-Mar-20 |        310        0.14       47.01
  19-Mar-20 |        310        0.14       47.15
  20-Mar-20 |        310        0.14       47.29
  21-Mar-20 |        310        0.14       47.43
  22-Mar-20 |        310        0.14       47.57
  23-Mar-20 |        310        0.14       47.71
  24-Mar-20 |        310        0.14       47.84
  25-Mar-20 |        310        0.14       47.98
  26-Mar-20 |        310        0.14       48.12
  27-Mar-20 |        310        0.14       48.26
  28-Mar-20 |        310        0.14       48.40
  29-Mar-20 |        310        0.14       48.54
  30-Mar-20 |        310        0.14       48.68
  31-Mar-20 |        310        0.14       48.82
   1-Apr-20 |        310        0.14       48.96
   2-Apr-20 |        310        0.14       49.10
   3-Apr-20 |        310        0.14       49.24
   4-Apr-20 |        310        0.14       49.37
   5-Apr-20 |        310        0.14       49.51
   6-Apr-20 |        310        0.14       49.65
   7-Apr-20 |        310        0.14       49.79
   8-Apr-20 |        310        0.14       49.93
   9-Apr-20 |        310        0.14       50.07
  10-Apr-20 |        310        0.14       50.21
  11-Apr-20 |        310        0.14       50.35
  12-Apr-20 |        310        0.14       50.49
  13-Apr-20 |        310        0.14       50.63
  14-Apr-20 |        310        0.14       50.76
  15-Apr-20 |        310        0.14       50.90
  16-Apr-20 |        310        0.14       51.04
  17-Apr-20 |        310        0.14       51.18
  18-Apr-20 |        310        0.14       51.32
  19-Apr-20 |        310        0.14       51.46
  20-Apr-20 |        310        0.14       51.60
  21-Apr-20 |        310        0.14       51.74
  22-Apr-20 |        310        0.14       51.88
  23-Apr-20 |        310        0.14       52.02
  24-Apr-20 |        310        0.14       52.16
  25-Apr-20 |        310        0.14       52.29
  26-Apr-20 |        310        0.14       52.43
  27-Apr-20 |        310        0.14       52.57
  28-Apr-20 |        310        0.14       52.71
  29-Apr-20 |        310        0.14       52.85
  30-Apr-20 |        310        0.14       52.99
   1-May-20 |        310        0.14       53.13
   2-May-20 |        310        0.14       53.27
   3-May-20 |        310        0.14       53.41
   4-May-20 |        310        0.14       53.55
   5-May-20 |        310        0.14       53.69
   6-May-20 |        310        0.14       53.82
   7-May-20 |        310        0.14       53.96
   8-May-20 |        310        0.14       54.10
   9-May-20 |        310        0.14       54.24
  10-May-20 |        310        0.14       54.38
  11-May-20 |        310        0.14       54.52
  12-May-20 |        310        0.14       54.66
  13-May-20 |        310        0.14       54.80
  14-May-20 |        310        0.14       54.94
  15-May-20 |        310        0.14       55.08
  16-May-20 |        310        0.14       55.22
  17-May-20 |        310        0.14       55.35
  18-May-20 |        310        0.14       55.49
  19-May-20 |        310        0.14       55.63
  20-May-20 |        310        0.14       55.77
  21-May-20 |        310        0.14       55.91
  22-May-20 |        310        0.14       56.05
  23-May-20 |        310        0.14       56.19
  24-May-20 |        310        0.14       56.33
  25-May-20 |        310        0.14       56.47
  26-May-20 |        310        0.14       56.61
  27-May-20 |        310        0.14       56.75
  28-May-20 |        310        0.14       56.88
  29-May-20 |        310        0.14       57.02
  30-May-20 |        310        0.14       57.16
  31-May-20 |        310        0.14       57.30
   1-Jun-20 |        310        0.14       57.44
   2-Jun-20 |        310        0.14       57.58
   3-Jun-20 |        310        0.14       57.72
   4-Jun-20 |        310        0.14       57.86
   5-Jun-20 |        310        0.14       58.00
   6-Jun-20 |        310        0.14       58.14
   7-Jun-20 |        310        0.14       58.28
   8-Jun-20 |        310        0.14       58.41
   9-Jun-20 |        310        0.14       58.55
  10-Jun-20 |        310        0.14       58.69
  11-Jun-20 |        310        0.14       58.83
  12-Jun-20 |        310        0.14       58.97
  13-Jun-20 |        310        0.14       59.11
  14-Jun-20 |        310        0.14       59.25
  15-Jun-20 |        310        0.14       59.39
  16-Jun-20 |        310        0.14       59.53
  17-Jun-20 |        310        0.14       59.67
  18-Jun-20 |        310        0.14       59.81
  19-Jun-20 |        310        0.14       59.94
  20-Jun-20 |        310        0.14       60.08
  21-Jun-20 |        310        0.14       60.22
  22-Jun-20 |        310        0.14       60.36
  23-Jun-20 |        310        0.14       60.50
  24-Jun-20 |        310        0.14       60.64
  25-Jun-20 |        310        0.14       60.78
  26-Jun-20 |        310        0.14       60.92
  27-Jun-20 |        310        0.14       61.06
  28-Jun-20 |        310        0.14       61.20
  29-Jun-20 |        310        0.14       61.34
  30-Jun-20 |        310        0.14       61.47
   1-Jul-20 |        310        0.14       61.61
   2-Jul-20 |        310        0.14       61.75
   3-Jul-20 |        310        0.14       61.89
   4-Jul-20 |        310        0.14       62.03
   5-Jul-20 |        310        0.14       62.17
   6-Jul-20 |        310        0.14       62.31
   7-Jul-20 |        310        0.14       62.45
   8-Jul-20 |        310        0.14       62.59
   9-Jul-20 |        310        0.14       62.73
  10-Jul-20 |        310        0.14       62.87
  11-Jul-20 |        310        0.14       63.00
  12-Jul-20 |        310        0.14       63.14
  13-Jul-20 |        310        0.14       63.28
  14-Jul-20 |        310        0.14       63.42
  15-Jul-20 |        310        0.14       63.56
  16-Jul-20 |        310        0.14       63.70
  17-Jul-20 |        310        0.14       63.84
  18-Jul-20 |        310        0.14       63.98
  19-Jul-20 |        310        0.14       64.12
  20-Jul-20 |        310        0.14       64.26
  21-Jul-20 |        310        0.14       64.39
  22-Jul-20 |        310        0.14       64.53
  23-Jul-20 |        310        0.14       64.67
  24-Jul-20 |        310        0.14       64.81
  25-Jul-20 |        310        0.14       64.95
  26-Jul-20 |        310        0.14       65.09
  27-Jul-20 |        310        0.14       65.23
  28-Jul-20 |        310        0.14       65.37
  29-Jul-20 |        310        0.14       65.51
  30-Jul-20 |        310        0.14       65.65
  31-Jul-20 |        310        0.14       65.79
   1-Aug-20 |        310        0.14       65.92
   2-Aug-20 |        310        0.14       66.06
   3-Aug-20 |        310        0.14       66.20
   4-Aug-20 |        310        0.14       66.34
   5-Aug-20 |        310        0.14       66.48
   6-Aug-20 |        310        0.14       66.62
   7-Aug-20 |        310        0.14       66.76
   8-Aug-20 |        310        0.14       66.90
   9-Aug-20 |        310        0.14       67.04
  10-Aug-20 |        310        0.14       67.18
  11-Aug-20 |        310        0.14       67.32
  12-Aug-20 |        310        0.14       67.45
  13-Aug-20 |        310        0.14       67.59
  14-Aug-20 |        310        0.14       67.73
  15-Aug-20 |        310        0.14       67.87
  16-Aug-20 |        310        0.14       68.01
  17-Aug-20 |        310        0.14       68.15
  18-Aug-20 |        310        0.14       68.29
  19-Aug-20 |        310        0.14       68.43
  20-Aug-20 |        310        0.14       68.57
  21-Aug-20 |        310        0.14       68.71
  22-Aug-20 |        310        0.14       68.85
  23-Aug-20 |        310        0.14       68.98
  24-Aug-20 |        310        0.14       69.12
  25-Aug-20 |        310        0.14       69.26
  26-Aug-20 |        310        0.14       69.40
  27-Aug-20 |        310        0.14       69.54
  28-Aug-20 |        310        0.14       69.68
  29-Aug-20 |        310        0.14       69.82
  30-Aug-20 |        310        0.14       69.96
  31-Aug-20 |        310        0.14       70.10
   1-Sep-20 |        310        0.14       70.24
   2-Sep-20 |        310        0.14       70.38
   3-Sep-20 |        310        0.14       70.51
   4-Sep-20 |        310        0.14       70.65
   5-Sep-20 |        310        0.14       70.79
   6-Sep-20 |        310        0.14       70.93
   7-Sep-20 |        310        0.14       71.07
   8-Sep-20 |        310        0.14       71.21
   9-Sep-20 |        310        0.14       71.35
  10-Sep-20 |        310        0.14       71.49
  11-Sep-20 |        310        0.14       71.63
  12-Sep-20 |        310        0.14       71.77
  13-Sep-20 |        310        0.14       71.91
  14-Sep-20 |        310        0.14       72.04
  15-Sep-20 |        310        0.14       72.18
  16-Sep-20 |        310        0.14       72.32
  17-Sep-20 |        310        0.14       72.46
  18-Sep-20 |        310        0.14       72.60
  19-Sep-20 |        310        0.14       72.74
  20-Sep-20 |        310        0.14       72.88
  21-Sep-20 |        310        0.14       73.02
  22-Sep-20 |        310        0.14       73.16
  23-Sep-20 |        310        0.14       73.30
  24-Sep-20 |        310        0.14       73.44
  25-Sep-20 |        310        0.14       73.57
  26-Sep-20 |        310        0.14       73.71
  27-Sep-20 |        310        0.14       73.85
  28-Sep-20 |        310        0.14       73.99
  29-Sep-20 |        310        0.14       74.13
  30-Sep-20 |        310        0.14       74.27
   1-Oct-20 |        310        0.14       74.41
   2-Oct-20 |        310        0.14       74.55
   3-Oct-20 |        310        0.14       74.69
   4-Oct-20 |        310        0.14       74.83
   5-Oct-20 |        310        0.14       74.97
   6-Oct-20 |        310        0.14       75.10
   7-Oct-20 |        310        0.14       75.24
   8-Oct-20 |        310        0.14       75.38
   9-Oct-20 |        310        0.14       75.52
  10-Oct-20 |        310        0.14       75.66
  11-Oct-20 |        310        0.14       75.80
  12-Oct-20 |        310        0.14       75.94
  13-Oct-20 |        310        0.14       76.08
  14-Oct-20 |        310        0.14       76.22
  15-Oct-20 |        310        0.14       76.36
  16-Oct-20 |        310        0.14       76.50
  17-Oct-20 |        310        0.14       76.63
  18-Oct-20 |        310        0.14       76.77
  19-Oct-20 |        310        0.14       76.91
  20-Oct-20 |        310        0.14       77.05
  21-Oct-20 |        310        0.14       77.19
  22-Oct-20 |        310        0.14       77.33
  23-Oct-20 |        310        0.14       77.47
  24-Oct-20 |        310        0.14       77.61
  25-Oct-20 |        310        0.14       77.75
  26-Oct-20 |        310        0.14       77.89
  27-Oct-20 |        310        0.14       78.03
  28-Oct-20 |        310        0.14       78.16
  29-Oct-20 |        310        0.14       78.30
  30-Oct-20 |        310        0.14       78.44
  31-Oct-20 |        310        0.14       78.58
   1-Nov-20 |        310        0.14       78.72
   2-Nov-20 |        310        0.14       78.86
   3-Nov-20 |        310        0.14       79.00
   4-Nov-20 |        310        0.14       79.14
   5-Nov-20 |        310        0.14       79.28
   6-Nov-20 |        310        0.14       79.42
   7-Nov-20 |        310        0.14       79.55
   8-Nov-20 |        310        0.14       79.69
   9-Nov-20 |        310        0.14       79.83
  10-Nov-20 |        310        0.14       79.97
  11-Nov-20 |        310        0.14       80.11
  12-Nov-20 |        310        0.14       80.25
  13-Nov-20 |        310        0.14       80.39
  14-Nov-20 |        310        0.14       80.53
  15-Nov-20 |        310        0.14       80.67
  16-Nov-20 |        310        0.14       80.81
  17-Nov-20 |        310        0.14       80.95
  18-Nov-20 |        310        0.14       81.08
  19-Nov-20 |        310        0.14       81.22
  20-Nov-20 |        310        0.14       81.36
  21-Nov-20 |        310        0.14       81.50
  22-Nov-20 |        310        0.14       81.64
  23-Nov-20 |        310        0.14       81.78
  24-Nov-20 |        310        0.14       81.92
  25-Nov-20 |        310        0.14       82.06
  26-Nov-20 |        310        0.14       82.20
  27-Nov-20 |        310        0.14       82.34
  28-Nov-20 |        310        0.14       82.48
  29-Nov-20 |        310        0.14       82.61
  30-Nov-20 |        310        0.14       82.75
   1-Dec-20 |        310        0.14       82.89
   2-Dec-20 |        310        0.14       83.03
   3-Dec-20 |        310        0.14       83.17
   4-Dec-20 |        310        0.14       83.31
   5-Dec-20 |        310        0.14       83.45
   6-Dec-20 |        310        0.14       83.59
   7-Dec-20 |        310        0.14       83.73
   8-Dec-20 |        310        0.14       83.87
   9-Dec-20 |        310        0.14       84.01
  10-Dec-20 |        310        0.14       84.14
  11-Dec-20 |        310        0.14       84.28
  12-Dec-20 |        310        0.14       84.42
  13-Dec-20 |        310        0.14       84.56
  14-Dec-20 |        310        0.14       84.70
  15-Dec-20 |        310        0.14       84.84
  16-Dec-20 |        310        0.14       84.98
  17-Dec-20 |        310        0.14       85.12
  18-Dec-20 |        310        0.14       85.26
  19-Dec-20 |        310        0.14       85.40
  20-Dec-20 |        310        0.14       85.54
  21-Dec-20 |        310        0.14       85.67
  22-Dec-20 |        310        0.14       85.81
  23-Dec-20 |        310        0.14       85.95
  24-Dec-20 |        310        0.14       86.09
  25-Dec-20 |        310        0.14       86.23
  26-Dec-20 |        310        0.14       86.37
  27-Dec-20 |        310        0.14       86.51
  28-Dec-20 |        310        0.14       86.65
  29-Dec-20 |        310        0.14       86.79
  30-Dec-20 |        310        0.14       86.93
  31-Dec-20 |        310        0.14       87.07
   1-Jan-21 |        310        0.14       87.20
   2-Jan-21 |        310        0.14       87.34
   3-Jan-21 |        310        0.14       87.48
   4-Jan-21 |        310        0.14       87.62
   5-Jan-21 |        310        0.14       87.76
   6-Jan-21 |        310        0.14       87.90
   7-Jan-21 |        310        0.14       88.04
   8-Jan-21 |        310        0.14       88.18
   9-Jan-21 |        310        0.14       88.32
  10-Jan-21 |        310        0.14       88.46
  11-Jan-21 |        310        0.14       88.60
  12-Jan-21 |        310        0.14       88.73
  13-Jan-21 |        310        0.14       88.87
  14-Jan-21 |        310        0.14       89.01
  15-Jan-21 |        310        0.14       89.15
  16-Jan-21 |        310        0.14       89.29
  17-Jan-21 |        310        0.14       89.43
  18-Jan-21 |        310        0.14       89.57
  19-Jan-21 |        310        0.14       89.71
  20-Jan-21 |        310        0.14       89.85
  21-Jan-21 |        310        0.14       89.99
  22-Jan-21 |        310        0.14       90.13
  23-Jan-21 |        310        0.14       90.26
  24-Jan-21 |        310        0.14       90.40
  25-Jan-21 |        310        0.14       90.54
  26-Jan-21 |        310        0.14       90.68
  27-Jan-21 |        310        0.14       90.82
  28-Jan-21 |        310        0.14       90.96
  29-Jan-21 |        310        0.14       91.10
  30-Jan-21 |        310        0.14       91.24
  31-Jan-21 |        310        0.14       91.38
   1-Feb-21 |        310        0.14       91.52
   2-Feb-21 |        310        0.14       91.66
   3-Feb-21 |        310        0.14       91.79
   4-Feb-21 |        310        0.14       91.93
   5-Feb-21 |        310        0.14       92.07
   6-Feb-21 |        310        0.14       92.21
   7-Feb-21 |        310        0.14       92.35
   8-Feb-21 |        310        0.14       92.49
   9-Feb-21 |        310        0.14       92.63
  10-Feb-21 |        310        0.14       92.77
  11-Feb-21 |        310        0.14       92.91
  12-Feb-21 |        310        0.14       93.05
  13-Feb-21 |        310        0.14       93.18
  14-Feb-21 |        310        0.14       93.32
  15-Feb-21 |        310        0.14       93.46
  16-Feb-21 |        310        0.14       93.60
  17-Feb-21 |        310        0.14       93.74
  18-Feb-21 |        310        0.14       93.88
  19-Feb-21 |        310        0.14       94.02
  20-Feb-21 |        310        0.14       94.16
  21-Feb-21 |        310        0.14       94.30
  22-Feb-21 |        310        0.14       94.44
  23-Feb-21 |        310        0.14       94.58
  24-Feb-21 |        310        0.14       94.71
  25-Feb-21 |        310        0.14       94.85
  26-Feb-21 |        310        0.14       94.99
  27-Feb-21 |        310        0.14       95.13
  28-Feb-21 |        310        0.14       95.27
   1-Mar-21 |        310        0.14       95.41
   2-Mar-21 |        310        0.14       95.55
   3-Mar-21 |        310        0.14       95.69
   4-Mar-21 |        310        0.14       95.83
   5-Mar-21 |        310        0.14       95.97
   6-Mar-21 |        310        0.14       96.11
   7-Mar-21 |        310        0.14       96.24
   8-Mar-21 |        310        0.14       96.38
   9-Mar-21 |        310        0.14       96.52
  10-Mar-21 |        310        0.14       96.66
  11-Mar-21 |        310        0.14       96.80
  12-Mar-21 |        310        0.14       96.94
  13-Mar-21 |        310        0.14       97.08
  14-Mar-21 |        310        0.14       97.22
  15-Mar-21 |        310        0.14       97.36
  16-Mar-21 |        310        0.14       97.50
  17-Mar-21 |        310        0.14       97.64
  18-Mar-21 |        310        0.14       97.77
  19-Mar-21 |        310        0.14       97.91
  20-Mar-21 |        310        0.14       98.05
  21-Mar-21 |        310        0.14       98.19
  22-Mar-21 |        310        0.14       98.33
  23-Mar-21 |        310        0.14       98.47
  24-Mar-21 |        310        0.14       98.61
  25-Mar-21 |        310        0.14       98.75
  26-Mar-21 |        310        0.14       98.89
  27-Mar-21 |        310        0.14       99.03
  28-Mar-21 |        310        0.14       99.17
  29-Mar-21 |        310        0.14       99.30
  30-Mar-21 |        310        0.14       99.44
  31-Mar-21 |        310        0.14       99.58
   1-Apr-21 |        310        0.14       99.72
   2-Apr-21 |        310        0.14       99.86
   3-Apr-21 |        310        0.14      100.00
------------+-----------------------------------
      Total |    222,890      100.00

. ** 222,890 Observations. 310 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. gen period = 0

. ** Mock-I
. replace period = 0 if date >= td(15jul2019) 
(0 real changes made)

. ** Mock-II
. replace period = 0 if date >= td(13aug2019)
(0 real changes made)

. ** Comp-I
. replace period = 1 if date >= td(16sep2019)
(175,460 real changes made)

. ** Comp-II
. replace period = 2 if date >= td(16oct2019)
(166,160 real changes made)

. ** Comp-III
. replace period = 3 if date >= td(16nov2019)
(156,550 real changes made)

. ** Comp-IV
. replace period = 4 if date >= td(01jan2020)
(142,290 real changes made)

. ** Comp-V
. replace period = 5 if date >= td(01feb2020)
(132,680 real changes made)

. ** Comp-VI
. replace period = 6 if date >= td(01mar2020)
(123,690 real changes made)

. ** Interregnum-I
. replace period = 0 if date >= td(22mar2020)
(117,180 real changes made)

. ** Mock-III
. replace period = 0 if date >= td(12oct2020)
(0 real changes made)

. ** Interregnum-II
. replace period = 0 if date >= td(12nov2020)
(0 real changes made)

. ** Comp-VII
. replace period = 7 if date >= td(01dec2020)
(38,440 real changes made)

. ** Comp-VIII
. replace period = 8 if date >= td(01jan2021)
(28,830 real changes made)

. ** Comp-IX
. replace period = 9 if date >= td(01feb2021)
(19,220 real changes made)

. ** Comp-X
. replace period = 10 if date >= td(01mar2021)
(10,540 real changes made)

. 
. drop if date >=  td(01apr2021)
(930 observations deleted)

. 
. *tab period if composite_id == "GJSRT100740111"
. gen temp = 1

. bysort period: egen period_length = sum(temp) 

. replace period_length = period_length / 310 
(221,960 real changes made)

. drop temp

. 
. ********************************************************************************
. ********************* [1] CALCULATE ACTUAL STACK DAY MASS **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Replace tot_report_hrs to zero 
.         ** if the stack was not sending a valid caliberated stack-day kg/hr that day
.         gen tot_report_hrs_rule`i' = tot_report_hrs
  3.         replace tot_report_hrs_rule`i' = 0 if D_vctransmitting_rule`i' == 0
  4.         label var tot_report_hrs_rule`i' ///
>                 "[RE-LABELED] Stack-day VALID CALIBRATED Reporting Hours from CEMS - rule `i'"
  5. 
.         ** Calculate DAILY actual mass emissions using CEMA Day Reporting Hours
.         gen stack_daily_mass_actual_rule`i' = pm_mass_rule`i' * tot_report_hrs_rule`i'
  6.         la var stack_daily_mass_actual_rule`i' ///
>                 "Stack Day Actual Mass Emissions (kg) from CEMS Reported Hours - rule `i'"
  7. 
. }
(13,799 real changes made)
(92,287 missing values generated)
(13,140 real changes made)
(91,628 missing values generated)
(51,614 real changes made)
(130,102 missing values generated)
(51,140 real changes made)
(129,628 missing values generated)
(71,887 real changes made)
(150,375 missing values generated)
(71,520 real changes made)
(150,008 missing values generated)
(60,805 real changes made)
(139,293 missing values generated)
(60,375 real changes made)
(138,863 missing values generated)
(30,192 real changes made)
(108,680 missing values generated)
(29,607 real changes made)
(108,095 missing values generated)

. 
. ********************************************************************************
. ***************** [2] DAILY NON-REPORTING HOURS FOR IMPUTATION *****************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate DAILY non-reporting hours for imputation
.         gen daily_nonreport_hrs_rule`i' = 24 - tot_report_hrs_rule`i'
  3.         order daily_nonreport_hrs_rule`i', a(tot_report_hrs_rule`i')
  4.         la var daily_nonreport_hrs_rule`i' ///
>                 "Stack Day NON-Reporting Hours - CEMS - rule `i'"
  5. 
. }

. 
. ********************************************************************************
. ********* [3] For Imp: GENERATE STACK'S OWN WEEK and MONTH MEAN KG/HR **********
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate stack's own week mean kg/hr for missing pm mass values
.         bysort composite_id week: egen week_mean_mass_rule`i' = mean(pm_mass_rule`i')
  3.         label var week_mean_mass_rule`i' "Stack Week Mean kg/hr - rule `i'"
  4. 
.         ** Calculate stack's own month mean kg/hr for stacks missing entire week of pm mass
.         bysort composite_id period: egen period_mean_mass_rule`i' = mean(pm_mass_rule`i')
  5.         label var period_mean_mass_rule`i' "Stack Period Mean kg/hr - rule `i'"
  6. 
. }
(77,577 missing values generated)
(12,132 missing values generated)
(77,038 missing values generated)
(11,982 missing values generated)
(119,197 missing values generated)
(81,288 missing values generated)
(118,820 missing values generated)
(81,259 missing values generated)
(141,323 missing values generated)
(114,263 missing values generated)
(141,099 missing values generated)
(114,263 missing values generated)
(129,488 missing values generated)
(96,593 missing values generated)
(129,167 missing values generated)
(96,564 missing values generated)
(95,938 missing values generated)
(47,161 missing values generated)
(95,484 missing values generated)
(47,042 missing values generated)

. 
. /*******************************************************************************
>            NOW READY FOR IMPUTATION RULE 0a.
>            THE IMPLEMENTATION OF THIS RULE WILL BE:
> 
>            1)   IMPUTE STACK'S OWN WEEK MEAN PM_MASS (KG/HR) FOR ALL MISSING VALUES
>            OF STACK DAY PM_MASS (KG/HR). 
>            2)   IF WEEK MEAN KG/HR IS MISSING, IMPUTE MONTH MEAN PM_MASS (KG/HR)
>            3)   THE FINAL EMISSION QUANTITY IS:
> 
>            VALIDATED STACK MASS (KG) = 
>            ACTUAL STACK MASS (KG) USING CEMS REPORTED HOURS +
>            IMPUTED STACK MASS (KG) USING CEMS NON-REPORTED HOURS
>    ****************************************************************************/
. 
. 
. 
. ********************************************************************************
. ******************** [4] CALCULATE DAILY STACK IMPUTED MASS ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate PER DAY imputed emissions
.         gen stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * week_mean_mass_rule`i'
  3.         replace stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * period_mean_mass_rule`i' ///
>                 if week_mean_mass_rule`i' == .
  4.         la var stack_daily_mass_imp_rule`i' ///
>                 "Stack-day Imputed Mass Emissions (kg) from CEMS Non-Reported Hours - rule`i'"
  5. 
.         ** Correct for week of Diwali 2019 when imputation should be zero.
.         replace stack_daily_mass_imp_rule`i' = 0 if ///
>                 date >= date("2019oct26", "YMD") & ///
>                 date <= date("2019nov03", "YMD") & ///
>                 stack_daily_mass_imp_rule`i' != .
  6. 
. }
(77,577 missing values generated)
(65,481 real changes made)
(1,449 real changes made)
(77,038 missing values generated)
(65,086 real changes made)
(1,446 real changes made)
(119,197 missing values generated)
(37,935 real changes made)
(987 real changes made)
(118,820 missing values generated)
(37,587 real changes made)
(982 real changes made)
(141,323 missing values generated)
(27,086 real changes made)
(805 real changes made)
(141,099 missing values generated)
(26,862 real changes made)
(800 real changes made)
(129,488 missing values generated)
(32,921 real changes made)
(904 real changes made)
(129,167 missing values generated)
(32,629 real changes made)
(899 real changes made)
(95,938 missing values generated)
(48,809 real changes made)
(1,264 real changes made)
(95,484 missing values generated)
(48,468 real changes made)
(1,253 real changes made)

. 
. ********************************************************************************
. ******************* [5] CALCULATE DAILY STACK VALIDATED MASS *******************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate validated DAY emissions per stack
.         gen stack_daily_mass_val_rule`i' = stack_daily_mass_actual_rule`i' + stack_daily_mass_imp_rule`i'
  3.         replace stack_daily_mass_val_rule`i' = stack_daily_mass_imp_rule`i' ///
>                 if stack_daily_mass_val_rule`i' == .
  4.         la var stack_daily_mass_val_rule`i' ///
>                 "Stack Day Validated Mass Emissions (kg) (=Stack-day Actual + Stack-day Imp) - rule `i'"
  5. 
. }
(92,287 missing values generated)
(80,191 real changes made)
note: label truncated to 80 characters
(91,628 missing values generated)
(79,676 real changes made)
note: label truncated to 80 characters
(130,102 missing values generated)
(48,840 real changes made)
note: label truncated to 80 characters
(129,628 missing values generated)
(48,395 real changes made)
note: label truncated to 80 characters
(150,375 missing values generated)
(36,138 real changes made)
note: label truncated to 80 characters
(150,008 missing values generated)
(35,771 real changes made)
note: label truncated to 80 characters
(139,293 missing values generated)
(42,726 real changes made)
note: label truncated to 80 characters
(138,863 missing values generated)
(42,325 real changes made)
note: label truncated to 80 characters
(108,680 missing values generated)
(61,551 real changes made)
note: label truncated to 80 characters
(108,095 missing values generated)
(61,079 real changes made)
note: label truncated to 80 characters

. 
. /*******************************************************************************
>            NOW READY TO MAKE THE DEPENDENT VARIABLE FOR REGRESSIONS IN PART 6 
>            (6. TREATMENT EFFECT ANALYSIS). THIS VAR IS PLANT MONTH MASS (KG).
> 
>            STEPS TO CREATE THIS VARIABLE WILL BE:
> 
>            6.1) CALCULATE STACK WEEK MASS (KG), AND THEN PLANT WEEK MASS (KG).
>            FIRST GENERATE THESE VARIABLES IN THE STACK-DAY LEVEL DATA SET.
>            AND SAVE IT FOR FUTURE USE IF NEEDED ("_StackDayLevel.dta").
> 
>            6.2) THEN, COLLAPSE THE STACK-DAY LEVEL DATA SET TO KEEP ONE DATA POINT 
>            PER PLANT PER WEEK ("_PlantWeekLevel.dta"). 
> 
>            CONTAINS THE DEPENDENT VARIABLE: PLANT-WEEK MASS (KG) EMISSIONS 
>            USING IMPUTATION RULE 0a.
>    ****************************************************************************/
. 
. preserve

. 
. ********************************************************************************
. ********************* [6.1] GENERATE STACK-MONTH MASS (KG) *********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER STACK
.         bysort composite_id period: egen stack_period_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id period: egen miss_stack_period_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_period_mass_val_rule`i' = . if miss_stack_period_mass_val == 1
  5.         la var stack_period_mass_val_rule`i' ///
>                 "Stack-period Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_stack_period_mass_val
  7. 
. }
(12,132 real changes made, 12,132 to missing)
(11,982 real changes made, 11,982 to missing)
(81,288 real changes made, 81,288 to missing)
(81,259 real changes made, 81,259 to missing)
(114,263 real changes made, 114,263 to missing)
(114,263 real changes made, 114,263 to missing)
(96,593 real changes made, 96,593 to missing)
(96,564 real changes made, 96,564 to missing)
(47,161 real changes made, 47,161 to missing)
(47,042 real changes made, 47,042 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id period: gen dump=_n

. bysort composite_id period: keep if _n==_N      
(218,550 observations deleted)

. keep composite_id industry_id gpcb_id period period_length treatmentstatus stack_period_mass_val* 

. ** 3,410 observations. 310 stacks. 11 periods.
. 
. 
. ********************************************************************************
. ******************** [6.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. /**     AS PER NICK'S INSTRUCTION ON WEEKLY CALL 01 DEC 2020: FOR PLANTS WITH >1 STACK, 
>            WE WILL ONLY CALCULATE THEIR PLANT MASS (KG) SUM IF ALL STACKS ARE CONNECTED. 
>            IF STACKS ARE PARTIALLY CONNECTED (i.e., ONLY 1 OF 3 STACKS CONNECTED), 
>    THE ENTIRE PLANT SUM WILL BE MISSING.        **/
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER PLANT
.         bysort gpcb_id period: egen ind_period_mass_val_rule`i' = sum(stack_period_mass_val_rule`i')
  3.         bysort gpcb_id period: egen miss_ind_period_mass_val = max(missing(stack_period_mass_val_rule`i'))
  4.         replace ind_period_mass_val_rule`i' = . if miss_ind_period_mass_val == 1
  5.         la var ind_period_mass_val_rule`i' ///
>                 "Plant-month Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_period_mass_val
  7. 
. }
(340 real changes made, 340 to missing)
(335 real changes made, 335 to missing)
(1,338 real changes made, 1,338 to missing)
(1,337 real changes made, 1,337 to missing)
(1,832 real changes made, 1,832 to missing)
(1,832 real changes made, 1,832 to missing)
(1,562 real changes made, 1,562 to missing)
(1,561 real changes made, 1,561 to missing)
(818 real changes made, 818 to missing)
(814 real changes made, 814 to missing)

. 
. gen temp = 1

. bysort gpcb_id: egen num_stack = sum(temp)

. replace num_stack = num_stack / 16
(3,410 real changes made)

. drop temp

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id period: gen dump=_n

. bysort gpcb_id period: keep if _n==_N
(198 observations deleted)

. keep industry_id gpcb_id period period_length treatmentstatus num_stack ind_period_mass_val* 

. keep if period > 0
(292 observations deleted)

. ** 2,920 observations. 292 plants. 16 periods.
. 
. save "$IMPUTATION_DATA_OUT/PlantPeriodPMMassRule0.dta", replace
(file 02DataPipeline/emissions/imputation/PlantPeriodPMMassRule0.dta not found)
file 02DataPipeline/emissions/imputation/PlantPeriodPMMassRule0.dta saved

. 
. restore

. 
end of do-file

. do "$CODE_DIR/imputation/3b. Create PM Mass (Stack-Experiment, Plant-Month).do"

. /*******************************************************************************
>            Author:      Dipika Gawande
>            Project: ETS
>            Purpose: Create the dependent variable for regression, PLANT-MONTH KG 
>            EMISSIONS (KG/MONTH), using IMPUTATION RULE A: WITHIN-STACK 
>            MEAN MONTH KG/HR.
> 
>            Note: IMPUTATION RULE A is executed as follows:
> 
>            1) Missing values of Stack day kg/hr are imputed with the stack's 
>            own week mean kg/hr.
> 
>            2) If no week mean kg/hr (i.e., stack is missing entire week 
>            of stack-day observations, or is not CEMS-connected), all remaining 
>            missing values of Stack day kg/hr are imputed with the stack's own 
>            month mean kg/hr
> 
>            Date created: 15 September 2020
>            Version: STATA 15 MP
> 
>            Last edited: 13 January 2022
>            Edited by: Jeanne, Vineet, Kaixin
>    ****************************************************************************/
. 
. set more off

. clear all

. pause on

. 
. *-------------------------------------------------------------------------------
. 
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. drop if date < date("2019jan16", "YMD")
(0 observations deleted)

. format date %tddd-Mon-YY

. sort date composite_id

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        337        0.14        0.14
  17-Apr-19 |        337        0.14        0.28
  18-Apr-19 |        337        0.14        0.42
  19-Apr-19 |        337        0.14        0.56
  20-Apr-19 |        337        0.14        0.70
  21-Apr-19 |        337        0.14        0.83
  22-Apr-19 |        337        0.14        0.97
  23-Apr-19 |        337        0.14        1.11
  24-Apr-19 |        337        0.14        1.25
  25-Apr-19 |        337        0.14        1.39
  26-Apr-19 |        337        0.14        1.53
  27-Apr-19 |        337        0.14        1.67
  28-Apr-19 |        337        0.14        1.81
  29-Apr-19 |        337        0.14        1.95
  30-Apr-19 |        337        0.14        2.09
   1-May-19 |        337        0.14        2.23
   2-May-19 |        337        0.14        2.36
   3-May-19 |        337        0.14        2.50
   4-May-19 |        337        0.14        2.64
   5-May-19 |        337        0.14        2.78
   6-May-19 |        337        0.14        2.92
   7-May-19 |        337        0.14        3.06
   8-May-19 |        337        0.14        3.20
   9-May-19 |        337        0.14        3.34
  10-May-19 |        337        0.14        3.48
  11-May-19 |        337        0.14        3.62
  12-May-19 |        337        0.14        3.76
  13-May-19 |        337        0.14        3.89
  14-May-19 |        337        0.14        4.03
  15-May-19 |        337        0.14        4.17
  16-May-19 |        337        0.14        4.31
  17-May-19 |        337        0.14        4.45
  18-May-19 |        337        0.14        4.59
  19-May-19 |        337        0.14        4.73
  20-May-19 |        337        0.14        4.87
  21-May-19 |        337        0.14        5.01
  22-May-19 |        337        0.14        5.15
  23-May-19 |        337        0.14        5.29
  24-May-19 |        337        0.14        5.42
  25-May-19 |        337        0.14        5.56
  26-May-19 |        337        0.14        5.70
  27-May-19 |        337        0.14        5.84
  28-May-19 |        337        0.14        5.98
  29-May-19 |        337        0.14        6.12
  30-May-19 |        337        0.14        6.26
  31-May-19 |        337        0.14        6.40
   1-Jun-19 |        337        0.14        6.54
   2-Jun-19 |        337        0.14        6.68
   3-Jun-19 |        337        0.14        6.82
   4-Jun-19 |        337        0.14        6.95
   5-Jun-19 |        337        0.14        7.09
   6-Jun-19 |        337        0.14        7.23
   7-Jun-19 |        337        0.14        7.37
   8-Jun-19 |        337        0.14        7.51
   9-Jun-19 |        337        0.14        7.65
  10-Jun-19 |        337        0.14        7.79
  11-Jun-19 |        337        0.14        7.93
  12-Jun-19 |        337        0.14        8.07
  13-Jun-19 |        337        0.14        8.21
  14-Jun-19 |        337        0.14        8.34
  15-Jun-19 |        337        0.14        8.48
  16-Jun-19 |        337        0.14        8.62
  17-Jun-19 |        337        0.14        8.76
  18-Jun-19 |        337        0.14        8.90
  19-Jun-19 |        337        0.14        9.04
  20-Jun-19 |        337        0.14        9.18
  21-Jun-19 |        337        0.14        9.32
  22-Jun-19 |        337        0.14        9.46
  23-Jun-19 |        337        0.14        9.60
  24-Jun-19 |        337        0.14        9.74
  25-Jun-19 |        337        0.14        9.87
  26-Jun-19 |        337        0.14       10.01
  27-Jun-19 |        337        0.14       10.15
  28-Jun-19 |        337        0.14       10.29
  29-Jun-19 |        337        0.14       10.43
  30-Jun-19 |        337        0.14       10.57
   1-Jul-19 |        337        0.14       10.71
   2-Jul-19 |        337        0.14       10.85
   3-Jul-19 |        337        0.14       10.99
   4-Jul-19 |        337        0.14       11.13
   5-Jul-19 |        337        0.14       11.27
   6-Jul-19 |        337        0.14       11.40
   7-Jul-19 |        337        0.14       11.54
   8-Jul-19 |        337        0.14       11.68
   9-Jul-19 |        337        0.14       11.82
  10-Jul-19 |        337        0.14       11.96
  11-Jul-19 |        337        0.14       12.10
  12-Jul-19 |        337        0.14       12.24
  13-Jul-19 |        337        0.14       12.38
  14-Jul-19 |        337        0.14       12.52
  15-Jul-19 |        337        0.14       12.66
  16-Jul-19 |        337        0.14       12.80
  17-Jul-19 |        337        0.14       12.93
  18-Jul-19 |        337        0.14       13.07
  19-Jul-19 |        337        0.14       13.21
  20-Jul-19 |        337        0.14       13.35
  21-Jul-19 |        337        0.14       13.49
  22-Jul-19 |        337        0.14       13.63
  23-Jul-19 |        337        0.14       13.77
  24-Jul-19 |        337        0.14       13.91
  25-Jul-19 |        337        0.14       14.05
  26-Jul-19 |        337        0.14       14.19
  27-Jul-19 |        337        0.14       14.33
  28-Jul-19 |        337        0.14       14.46
  29-Jul-19 |        337        0.14       14.60
  30-Jul-19 |        337        0.14       14.74
  31-Jul-19 |        337        0.14       14.88
   1-Aug-19 |        337        0.14       15.02
   2-Aug-19 |        337        0.14       15.16
   3-Aug-19 |        337        0.14       15.30
   4-Aug-19 |        337        0.14       15.44
   5-Aug-19 |        337        0.14       15.58
   6-Aug-19 |        337        0.14       15.72
   7-Aug-19 |        337        0.14       15.86
   8-Aug-19 |        337        0.14       15.99
   9-Aug-19 |        337        0.14       16.13
  10-Aug-19 |        337        0.14       16.27
  11-Aug-19 |        337        0.14       16.41
  12-Aug-19 |        337        0.14       16.55
  13-Aug-19 |        337        0.14       16.69
  14-Aug-19 |        337        0.14       16.83
  15-Aug-19 |        337        0.14       16.97
  16-Aug-19 |        337        0.14       17.11
  17-Aug-19 |        337        0.14       17.25
  18-Aug-19 |        337        0.14       17.39
  19-Aug-19 |        337        0.14       17.52
  20-Aug-19 |        337        0.14       17.66
  21-Aug-19 |        337        0.14       17.80
  22-Aug-19 |        337        0.14       17.94
  23-Aug-19 |        337        0.14       18.08
  24-Aug-19 |        337        0.14       18.22
  25-Aug-19 |        337        0.14       18.36
  26-Aug-19 |        337        0.14       18.50
  27-Aug-19 |        337        0.14       18.64
  28-Aug-19 |        337        0.14       18.78
  29-Aug-19 |        337        0.14       18.92
  30-Aug-19 |        337        0.14       19.05
  31-Aug-19 |        337        0.14       19.19
   1-Sep-19 |        337        0.14       19.33
   2-Sep-19 |        337        0.14       19.47
   3-Sep-19 |        337        0.14       19.61
   4-Sep-19 |        337        0.14       19.75
   5-Sep-19 |        337        0.14       19.89
   6-Sep-19 |        337        0.14       20.03
   7-Sep-19 |        337        0.14       20.17
   8-Sep-19 |        337        0.14       20.31
   9-Sep-19 |        337        0.14       20.45
  10-Sep-19 |        337        0.14       20.58
  11-Sep-19 |        337        0.14       20.72
  12-Sep-19 |        337        0.14       20.86
  13-Sep-19 |        337        0.14       21.00
  14-Sep-19 |        337        0.14       21.14
  15-Sep-19 |        337        0.14       21.28
  16-Sep-19 |        337        0.14       21.42
  17-Sep-19 |        337        0.14       21.56
  18-Sep-19 |        337        0.14       21.70
  19-Sep-19 |        337        0.14       21.84
  20-Sep-19 |        337        0.14       21.97
  21-Sep-19 |        337        0.14       22.11
  22-Sep-19 |        337        0.14       22.25
  23-Sep-19 |        337        0.14       22.39
  24-Sep-19 |        337        0.14       22.53
  25-Sep-19 |        337        0.14       22.67
  26-Sep-19 |        337        0.14       22.81
  27-Sep-19 |        337        0.14       22.95
  28-Sep-19 |        337        0.14       23.09
  29-Sep-19 |        337        0.14       23.23
  30-Sep-19 |        337        0.14       23.37
   1-Oct-19 |        337        0.14       23.50
   2-Oct-19 |        337        0.14       23.64
   3-Oct-19 |        337        0.14       23.78
   4-Oct-19 |        337        0.14       23.92
   5-Oct-19 |        337        0.14       24.06
   6-Oct-19 |        337        0.14       24.20
   7-Oct-19 |        337        0.14       24.34
   8-Oct-19 |        337        0.14       24.48
   9-Oct-19 |        337        0.14       24.62
  10-Oct-19 |        337        0.14       24.76
  11-Oct-19 |        337        0.14       24.90
  12-Oct-19 |        337        0.14       25.03
  13-Oct-19 |        337        0.14       25.17
  14-Oct-19 |        337        0.14       25.31
  15-Oct-19 |        337        0.14       25.45
  16-Oct-19 |        337        0.14       25.59
  17-Oct-19 |        337        0.14       25.73
  18-Oct-19 |        337        0.14       25.87
  19-Oct-19 |        337        0.14       26.01
  20-Oct-19 |        337        0.14       26.15
  21-Oct-19 |        337        0.14       26.29
  22-Oct-19 |        337        0.14       26.43
  23-Oct-19 |        337        0.14       26.56
  24-Oct-19 |        337        0.14       26.70
  25-Oct-19 |        337        0.14       26.84
  26-Oct-19 |        337        0.14       26.98
  27-Oct-19 |        337        0.14       27.12
  28-Oct-19 |        337        0.14       27.26
  29-Oct-19 |        337        0.14       27.40
  30-Oct-19 |        337        0.14       27.54
  31-Oct-19 |        337        0.14       27.68
   1-Nov-19 |        337        0.14       27.82
   2-Nov-19 |        337        0.14       27.96
   3-Nov-19 |        337        0.14       28.09
   4-Nov-19 |        337        0.14       28.23
   5-Nov-19 |        337        0.14       28.37
   6-Nov-19 |        337        0.14       28.51
   7-Nov-19 |        337        0.14       28.65
   8-Nov-19 |        337        0.14       28.79
   9-Nov-19 |        337        0.14       28.93
  10-Nov-19 |        337        0.14       29.07
  11-Nov-19 |        337        0.14       29.21
  12-Nov-19 |        337        0.14       29.35
  13-Nov-19 |        337        0.14       29.49
  14-Nov-19 |        337        0.14       29.62
  15-Nov-19 |        337        0.14       29.76
  16-Nov-19 |        337        0.14       29.90
  17-Nov-19 |        337        0.14       30.04
  18-Nov-19 |        337        0.14       30.18
  19-Nov-19 |        337        0.14       30.32
  20-Nov-19 |        337        0.14       30.46
  21-Nov-19 |        337        0.14       30.60
  22-Nov-19 |        337        0.14       30.74
  23-Nov-19 |        337        0.14       30.88
  24-Nov-19 |        337        0.14       31.02
  25-Nov-19 |        337        0.14       31.15
  26-Nov-19 |        337        0.14       31.29
  27-Nov-19 |        337        0.14       31.43
  28-Nov-19 |        337        0.14       31.57
  29-Nov-19 |        337        0.14       31.71
  30-Nov-19 |        337        0.14       31.85
   1-Dec-19 |        337        0.14       31.99
   2-Dec-19 |        337        0.14       32.13
   3-Dec-19 |        337        0.14       32.27
   4-Dec-19 |        337        0.14       32.41
   5-Dec-19 |        337        0.14       32.55
   6-Dec-19 |        337        0.14       32.68
   7-Dec-19 |        337        0.14       32.82
   8-Dec-19 |        337        0.14       32.96
   9-Dec-19 |        337        0.14       33.10
  10-Dec-19 |        337        0.14       33.24
  11-Dec-19 |        337        0.14       33.38
  12-Dec-19 |        337        0.14       33.52
  13-Dec-19 |        337        0.14       33.66
  14-Dec-19 |        337        0.14       33.80
  15-Dec-19 |        337        0.14       33.94
  16-Dec-19 |        337        0.14       34.08
  17-Dec-19 |        337        0.14       34.21
  18-Dec-19 |        337        0.14       34.35
  19-Dec-19 |        337        0.14       34.49
  20-Dec-19 |        337        0.14       34.63
  21-Dec-19 |        337        0.14       34.77
  22-Dec-19 |        337        0.14       34.91
  23-Dec-19 |        337        0.14       35.05
  24-Dec-19 |        337        0.14       35.19
  25-Dec-19 |        337        0.14       35.33
  26-Dec-19 |        337        0.14       35.47
  27-Dec-19 |        337        0.14       35.61
  28-Dec-19 |        337        0.14       35.74
  29-Dec-19 |        337        0.14       35.88
  30-Dec-19 |        337        0.14       36.02
  31-Dec-19 |        337        0.14       36.16
   1-Jan-20 |        337        0.14       36.30
   2-Jan-20 |        337        0.14       36.44
   3-Jan-20 |        337        0.14       36.58
   4-Jan-20 |        337        0.14       36.72
   5-Jan-20 |        337        0.14       36.86
   6-Jan-20 |        337        0.14       37.00
   7-Jan-20 |        337        0.14       37.13
   8-Jan-20 |        337        0.14       37.27
   9-Jan-20 |        337        0.14       37.41
  10-Jan-20 |        337        0.14       37.55
  11-Jan-20 |        337        0.14       37.69
  12-Jan-20 |        337        0.14       37.83
  13-Jan-20 |        337        0.14       37.97
  14-Jan-20 |        337        0.14       38.11
  15-Jan-20 |        337        0.14       38.25
  16-Jan-20 |        337        0.14       38.39
  17-Jan-20 |        337        0.14       38.53
  18-Jan-20 |        337        0.14       38.66
  19-Jan-20 |        337        0.14       38.80
  20-Jan-20 |        337        0.14       38.94
  21-Jan-20 |        337        0.14       39.08
  22-Jan-20 |        337        0.14       39.22
  23-Jan-20 |        337        0.14       39.36
  24-Jan-20 |        337        0.14       39.50
  25-Jan-20 |        337        0.14       39.64
  26-Jan-20 |        337        0.14       39.78
  27-Jan-20 |        337        0.14       39.92
  28-Jan-20 |        337        0.14       40.06
  29-Jan-20 |        337        0.14       40.19
  30-Jan-20 |        337        0.14       40.33
  31-Jan-20 |        337        0.14       40.47
   1-Feb-20 |        337        0.14       40.61
   2-Feb-20 |        337        0.14       40.75
   3-Feb-20 |        337        0.14       40.89
   4-Feb-20 |        337        0.14       41.03
   5-Feb-20 |        337        0.14       41.17
   6-Feb-20 |        337        0.14       41.31
   7-Feb-20 |        337        0.14       41.45
   8-Feb-20 |        337        0.14       41.59
   9-Feb-20 |        337        0.14       41.72
  10-Feb-20 |        337        0.14       41.86
  11-Feb-20 |        337        0.14       42.00
  12-Feb-20 |        337        0.14       42.14
  13-Feb-20 |        337        0.14       42.28
  14-Feb-20 |        337        0.14       42.42
  15-Feb-20 |        337        0.14       42.56
  16-Feb-20 |        337        0.14       42.70
  17-Feb-20 |        337        0.14       42.84
  18-Feb-20 |        337        0.14       42.98
  19-Feb-20 |        337        0.14       43.12
  20-Feb-20 |        337        0.14       43.25
  21-Feb-20 |        337        0.14       43.39
  22-Feb-20 |        337        0.14       43.53
  23-Feb-20 |        337        0.14       43.67
  24-Feb-20 |        337        0.14       43.81
  25-Feb-20 |        337        0.14       43.95
  26-Feb-20 |        337        0.14       44.09
  27-Feb-20 |        337        0.14       44.23
  28-Feb-20 |        337        0.14       44.37
  29-Feb-20 |        337        0.14       44.51
   1-Mar-20 |        337        0.14       44.65
   2-Mar-20 |        337        0.14       44.78
   3-Mar-20 |        337        0.14       44.92
   4-Mar-20 |        337        0.14       45.06
   5-Mar-20 |        337        0.14       45.20
   6-Mar-20 |        337        0.14       45.34
   7-Mar-20 |        337        0.14       45.48
   8-Mar-20 |        337        0.14       45.62
   9-Mar-20 |        337        0.14       45.76
  10-Mar-20 |        337        0.14       45.90
  11-Mar-20 |        337        0.14       46.04
  12-Mar-20 |        337        0.14       46.18
  13-Mar-20 |        337        0.14       46.31
  14-Mar-20 |        337        0.14       46.45
  15-Mar-20 |        337        0.14       46.59
  16-Mar-20 |        337        0.14       46.73
  17-Mar-20 |        337        0.14       46.87
  18-Mar-20 |        337        0.14       47.01
  19-Mar-20 |        337        0.14       47.15
  20-Mar-20 |        337        0.14       47.29
  21-Mar-20 |        337        0.14       47.43
  22-Mar-20 |        337        0.14       47.57
  23-Mar-20 |        337        0.14       47.71
  24-Mar-20 |        337        0.14       47.84
  25-Mar-20 |        337        0.14       47.98
  26-Mar-20 |        337        0.14       48.12
  27-Mar-20 |        337        0.14       48.26
  28-Mar-20 |        337        0.14       48.40
  29-Mar-20 |        337        0.14       48.54
  30-Mar-20 |        337        0.14       48.68
  31-Mar-20 |        337        0.14       48.82
   1-Apr-20 |        337        0.14       48.96
   2-Apr-20 |        337        0.14       49.10
   3-Apr-20 |        337        0.14       49.24
   4-Apr-20 |        337        0.14       49.37
   5-Apr-20 |        337        0.14       49.51
   6-Apr-20 |        337        0.14       49.65
   7-Apr-20 |        337        0.14       49.79
   8-Apr-20 |        337        0.14       49.93
   9-Apr-20 |        337        0.14       50.07
  10-Apr-20 |        337        0.14       50.21
  11-Apr-20 |        337        0.14       50.35
  12-Apr-20 |        337        0.14       50.49
  13-Apr-20 |        337        0.14       50.63
  14-Apr-20 |        337        0.14       50.76
  15-Apr-20 |        337        0.14       50.90
  16-Apr-20 |        337        0.14       51.04
  17-Apr-20 |        337        0.14       51.18
  18-Apr-20 |        337        0.14       51.32
  19-Apr-20 |        337        0.14       51.46
  20-Apr-20 |        337        0.14       51.60
  21-Apr-20 |        337        0.14       51.74
  22-Apr-20 |        337        0.14       51.88
  23-Apr-20 |        337        0.14       52.02
  24-Apr-20 |        337        0.14       52.16
  25-Apr-20 |        337        0.14       52.29
  26-Apr-20 |        337        0.14       52.43
  27-Apr-20 |        337        0.14       52.57
  28-Apr-20 |        337        0.14       52.71
  29-Apr-20 |        337        0.14       52.85
  30-Apr-20 |        337        0.14       52.99
   1-May-20 |        337        0.14       53.13
   2-May-20 |        337        0.14       53.27
   3-May-20 |        337        0.14       53.41
   4-May-20 |        337        0.14       53.55
   5-May-20 |        337        0.14       53.69
   6-May-20 |        337        0.14       53.82
   7-May-20 |        337        0.14       53.96
   8-May-20 |        337        0.14       54.10
   9-May-20 |        337        0.14       54.24
  10-May-20 |        337        0.14       54.38
  11-May-20 |        337        0.14       54.52
  12-May-20 |        337        0.14       54.66
  13-May-20 |        337        0.14       54.80
  14-May-20 |        337        0.14       54.94
  15-May-20 |        337        0.14       55.08
  16-May-20 |        337        0.14       55.22
  17-May-20 |        337        0.14       55.35
  18-May-20 |        337        0.14       55.49
  19-May-20 |        337        0.14       55.63
  20-May-20 |        337        0.14       55.77
  21-May-20 |        337        0.14       55.91
  22-May-20 |        337        0.14       56.05
  23-May-20 |        337        0.14       56.19
  24-May-20 |        337        0.14       56.33
  25-May-20 |        337        0.14       56.47
  26-May-20 |        337        0.14       56.61
  27-May-20 |        337        0.14       56.75
  28-May-20 |        337        0.14       56.88
  29-May-20 |        337        0.14       57.02
  30-May-20 |        337        0.14       57.16
  31-May-20 |        337        0.14       57.30
   1-Jun-20 |        337        0.14       57.44
   2-Jun-20 |        337        0.14       57.58
   3-Jun-20 |        337        0.14       57.72
   4-Jun-20 |        337        0.14       57.86
   5-Jun-20 |        337        0.14       58.00
   6-Jun-20 |        337        0.14       58.14
   7-Jun-20 |        337        0.14       58.28
   8-Jun-20 |        337        0.14       58.41
   9-Jun-20 |        337        0.14       58.55
  10-Jun-20 |        337        0.14       58.69
  11-Jun-20 |        337        0.14       58.83
  12-Jun-20 |        337        0.14       58.97
  13-Jun-20 |        337        0.14       59.11
  14-Jun-20 |        337        0.14       59.25
  15-Jun-20 |        337        0.14       59.39
  16-Jun-20 |        337        0.14       59.53
  17-Jun-20 |        337        0.14       59.67
  18-Jun-20 |        337        0.14       59.81
  19-Jun-20 |        337        0.14       59.94
  20-Jun-20 |        337        0.14       60.08
  21-Jun-20 |        337        0.14       60.22
  22-Jun-20 |        337        0.14       60.36
  23-Jun-20 |        337        0.14       60.50
  24-Jun-20 |        337        0.14       60.64
  25-Jun-20 |        337        0.14       60.78
  26-Jun-20 |        337        0.14       60.92
  27-Jun-20 |        337        0.14       61.06
  28-Jun-20 |        337        0.14       61.20
  29-Jun-20 |        337        0.14       61.34
  30-Jun-20 |        337        0.14       61.47
   1-Jul-20 |        337        0.14       61.61
   2-Jul-20 |        337        0.14       61.75
   3-Jul-20 |        337        0.14       61.89
   4-Jul-20 |        337        0.14       62.03
   5-Jul-20 |        337        0.14       62.17
   6-Jul-20 |        337        0.14       62.31
   7-Jul-20 |        337        0.14       62.45
   8-Jul-20 |        337        0.14       62.59
   9-Jul-20 |        337        0.14       62.73
  10-Jul-20 |        337        0.14       62.87
  11-Jul-20 |        337        0.14       63.00
  12-Jul-20 |        337        0.14       63.14
  13-Jul-20 |        337        0.14       63.28
  14-Jul-20 |        337        0.14       63.42
  15-Jul-20 |        337        0.14       63.56
  16-Jul-20 |        337        0.14       63.70
  17-Jul-20 |        337        0.14       63.84
  18-Jul-20 |        337        0.14       63.98
  19-Jul-20 |        337        0.14       64.12
  20-Jul-20 |        337        0.14       64.26
  21-Jul-20 |        337        0.14       64.39
  22-Jul-20 |        337        0.14       64.53
  23-Jul-20 |        337        0.14       64.67
  24-Jul-20 |        337        0.14       64.81
  25-Jul-20 |        337        0.14       64.95
  26-Jul-20 |        337        0.14       65.09
  27-Jul-20 |        337        0.14       65.23
  28-Jul-20 |        337        0.14       65.37
  29-Jul-20 |        337        0.14       65.51
  30-Jul-20 |        337        0.14       65.65
  31-Jul-20 |        337        0.14       65.79
   1-Aug-20 |        337        0.14       65.92
   2-Aug-20 |        337        0.14       66.06
   3-Aug-20 |        337        0.14       66.20
   4-Aug-20 |        337        0.14       66.34
   5-Aug-20 |        337        0.14       66.48
   6-Aug-20 |        337        0.14       66.62
   7-Aug-20 |        337        0.14       66.76
   8-Aug-20 |        337        0.14       66.90
   9-Aug-20 |        337        0.14       67.04
  10-Aug-20 |        337        0.14       67.18
  11-Aug-20 |        337        0.14       67.32
  12-Aug-20 |        337        0.14       67.45
  13-Aug-20 |        337        0.14       67.59
  14-Aug-20 |        337        0.14       67.73
  15-Aug-20 |        337        0.14       67.87
  16-Aug-20 |        337        0.14       68.01
  17-Aug-20 |        337        0.14       68.15
  18-Aug-20 |        337        0.14       68.29
  19-Aug-20 |        337        0.14       68.43
  20-Aug-20 |        337        0.14       68.57
  21-Aug-20 |        337        0.14       68.71
  22-Aug-20 |        337        0.14       68.85
  23-Aug-20 |        337        0.14       68.98
  24-Aug-20 |        337        0.14       69.12
  25-Aug-20 |        337        0.14       69.26
  26-Aug-20 |        337        0.14       69.40
  27-Aug-20 |        337        0.14       69.54
  28-Aug-20 |        337        0.14       69.68
  29-Aug-20 |        337        0.14       69.82
  30-Aug-20 |        337        0.14       69.96
  31-Aug-20 |        337        0.14       70.10
   1-Sep-20 |        337        0.14       70.24
   2-Sep-20 |        337        0.14       70.38
   3-Sep-20 |        337        0.14       70.51
   4-Sep-20 |        337        0.14       70.65
   5-Sep-20 |        337        0.14       70.79
   6-Sep-20 |        337        0.14       70.93
   7-Sep-20 |        337        0.14       71.07
   8-Sep-20 |        337        0.14       71.21
   9-Sep-20 |        337        0.14       71.35
  10-Sep-20 |        337        0.14       71.49
  11-Sep-20 |        337        0.14       71.63
  12-Sep-20 |        337        0.14       71.77
  13-Sep-20 |        337        0.14       71.91
  14-Sep-20 |        337        0.14       72.04
  15-Sep-20 |        337        0.14       72.18
  16-Sep-20 |        337        0.14       72.32
  17-Sep-20 |        337        0.14       72.46
  18-Sep-20 |        337        0.14       72.60
  19-Sep-20 |        337        0.14       72.74
  20-Sep-20 |        337        0.14       72.88
  21-Sep-20 |        337        0.14       73.02
  22-Sep-20 |        337        0.14       73.16
  23-Sep-20 |        337        0.14       73.30
  24-Sep-20 |        337        0.14       73.44
  25-Sep-20 |        337        0.14       73.57
  26-Sep-20 |        337        0.14       73.71
  27-Sep-20 |        337        0.14       73.85
  28-Sep-20 |        337        0.14       73.99
  29-Sep-20 |        337        0.14       74.13
  30-Sep-20 |        337        0.14       74.27
   1-Oct-20 |        337        0.14       74.41
   2-Oct-20 |        337        0.14       74.55
   3-Oct-20 |        337        0.14       74.69
   4-Oct-20 |        337        0.14       74.83
   5-Oct-20 |        337        0.14       74.97
   6-Oct-20 |        337        0.14       75.10
   7-Oct-20 |        337        0.14       75.24
   8-Oct-20 |        337        0.14       75.38
   9-Oct-20 |        337        0.14       75.52
  10-Oct-20 |        337        0.14       75.66
  11-Oct-20 |        337        0.14       75.80
  12-Oct-20 |        337        0.14       75.94
  13-Oct-20 |        337        0.14       76.08
  14-Oct-20 |        337        0.14       76.22
  15-Oct-20 |        337        0.14       76.36
  16-Oct-20 |        337        0.14       76.50
  17-Oct-20 |        337        0.14       76.63
  18-Oct-20 |        337        0.14       76.77
  19-Oct-20 |        337        0.14       76.91
  20-Oct-20 |        337        0.14       77.05
  21-Oct-20 |        337        0.14       77.19
  22-Oct-20 |        337        0.14       77.33
  23-Oct-20 |        337        0.14       77.47
  24-Oct-20 |        337        0.14       77.61
  25-Oct-20 |        337        0.14       77.75
  26-Oct-20 |        337        0.14       77.89
  27-Oct-20 |        337        0.14       78.03
  28-Oct-20 |        337        0.14       78.16
  29-Oct-20 |        337        0.14       78.30
  30-Oct-20 |        337        0.14       78.44
  31-Oct-20 |        337        0.14       78.58
   1-Nov-20 |        337        0.14       78.72
   2-Nov-20 |        337        0.14       78.86
   3-Nov-20 |        337        0.14       79.00
   4-Nov-20 |        337        0.14       79.14
   5-Nov-20 |        337        0.14       79.28
   6-Nov-20 |        337        0.14       79.42
   7-Nov-20 |        337        0.14       79.55
   8-Nov-20 |        337        0.14       79.69
   9-Nov-20 |        337        0.14       79.83
  10-Nov-20 |        337        0.14       79.97
  11-Nov-20 |        337        0.14       80.11
  12-Nov-20 |        337        0.14       80.25
  13-Nov-20 |        337        0.14       80.39
  14-Nov-20 |        337        0.14       80.53
  15-Nov-20 |        337        0.14       80.67
  16-Nov-20 |        337        0.14       80.81
  17-Nov-20 |        337        0.14       80.95
  18-Nov-20 |        337        0.14       81.08
  19-Nov-20 |        337        0.14       81.22
  20-Nov-20 |        337        0.14       81.36
  21-Nov-20 |        337        0.14       81.50
  22-Nov-20 |        337        0.14       81.64
  23-Nov-20 |        337        0.14       81.78
  24-Nov-20 |        337        0.14       81.92
  25-Nov-20 |        337        0.14       82.06
  26-Nov-20 |        337        0.14       82.20
  27-Nov-20 |        337        0.14       82.34
  28-Nov-20 |        337        0.14       82.48
  29-Nov-20 |        337        0.14       82.61
  30-Nov-20 |        337        0.14       82.75
   1-Dec-20 |        337        0.14       82.89
   2-Dec-20 |        337        0.14       83.03
   3-Dec-20 |        337        0.14       83.17
   4-Dec-20 |        337        0.14       83.31
   5-Dec-20 |        337        0.14       83.45
   6-Dec-20 |        337        0.14       83.59
   7-Dec-20 |        337        0.14       83.73
   8-Dec-20 |        337        0.14       83.87
   9-Dec-20 |        337        0.14       84.01
  10-Dec-20 |        337        0.14       84.14
  11-Dec-20 |        337        0.14       84.28
  12-Dec-20 |        337        0.14       84.42
  13-Dec-20 |        337        0.14       84.56
  14-Dec-20 |        337        0.14       84.70
  15-Dec-20 |        337        0.14       84.84
  16-Dec-20 |        337        0.14       84.98
  17-Dec-20 |        337        0.14       85.12
  18-Dec-20 |        337        0.14       85.26
  19-Dec-20 |        337        0.14       85.40
  20-Dec-20 |        337        0.14       85.54
  21-Dec-20 |        337        0.14       85.67
  22-Dec-20 |        337        0.14       85.81
  23-Dec-20 |        337        0.14       85.95
  24-Dec-20 |        337        0.14       86.09
  25-Dec-20 |        337        0.14       86.23
  26-Dec-20 |        337        0.14       86.37
  27-Dec-20 |        337        0.14       86.51
  28-Dec-20 |        337        0.14       86.65
  29-Dec-20 |        337        0.14       86.79
  30-Dec-20 |        337        0.14       86.93
  31-Dec-20 |        337        0.14       87.07
   1-Jan-21 |        337        0.14       87.20
   2-Jan-21 |        337        0.14       87.34
   3-Jan-21 |        337        0.14       87.48
   4-Jan-21 |        337        0.14       87.62
   5-Jan-21 |        337        0.14       87.76
   6-Jan-21 |        337        0.14       87.90
   7-Jan-21 |        337        0.14       88.04
   8-Jan-21 |        337        0.14       88.18
   9-Jan-21 |        337        0.14       88.32
  10-Jan-21 |        337        0.14       88.46
  11-Jan-21 |        337        0.14       88.60
  12-Jan-21 |        337        0.14       88.73
  13-Jan-21 |        337        0.14       88.87
  14-Jan-21 |        337        0.14       89.01
  15-Jan-21 |        337        0.14       89.15
  16-Jan-21 |        337        0.14       89.29
  17-Jan-21 |        337        0.14       89.43
  18-Jan-21 |        337        0.14       89.57
  19-Jan-21 |        337        0.14       89.71
  20-Jan-21 |        337        0.14       89.85
  21-Jan-21 |        337        0.14       89.99
  22-Jan-21 |        337        0.14       90.13
  23-Jan-21 |        337        0.14       90.26
  24-Jan-21 |        337        0.14       90.40
  25-Jan-21 |        337        0.14       90.54
  26-Jan-21 |        337        0.14       90.68
  27-Jan-21 |        337        0.14       90.82
  28-Jan-21 |        337        0.14       90.96
  29-Jan-21 |        337        0.14       91.10
  30-Jan-21 |        337        0.14       91.24
  31-Jan-21 |        337        0.14       91.38
   1-Feb-21 |        337        0.14       91.52
   2-Feb-21 |        337        0.14       91.66
   3-Feb-21 |        337        0.14       91.79
   4-Feb-21 |        337        0.14       91.93
   5-Feb-21 |        337        0.14       92.07
   6-Feb-21 |        337        0.14       92.21
   7-Feb-21 |        337        0.14       92.35
   8-Feb-21 |        337        0.14       92.49
   9-Feb-21 |        337        0.14       92.63
  10-Feb-21 |        337        0.14       92.77
  11-Feb-21 |        337        0.14       92.91
  12-Feb-21 |        337        0.14       93.05
  13-Feb-21 |        337        0.14       93.18
  14-Feb-21 |        337        0.14       93.32
  15-Feb-21 |        337        0.14       93.46
  16-Feb-21 |        337        0.14       93.60
  17-Feb-21 |        337        0.14       93.74
  18-Feb-21 |        337        0.14       93.88
  19-Feb-21 |        337        0.14       94.02
  20-Feb-21 |        337        0.14       94.16
  21-Feb-21 |        337        0.14       94.30
  22-Feb-21 |        337        0.14       94.44
  23-Feb-21 |        337        0.14       94.58
  24-Feb-21 |        337        0.14       94.71
  25-Feb-21 |        337        0.14       94.85
  26-Feb-21 |        337        0.14       94.99
  27-Feb-21 |        337        0.14       95.13
  28-Feb-21 |        337        0.14       95.27
   1-Mar-21 |        337        0.14       95.41
   2-Mar-21 |        337        0.14       95.55
   3-Mar-21 |        337        0.14       95.69
   4-Mar-21 |        337        0.14       95.83
   5-Mar-21 |        337        0.14       95.97
   6-Mar-21 |        337        0.14       96.11
   7-Mar-21 |        337        0.14       96.24
   8-Mar-21 |        337        0.14       96.38
   9-Mar-21 |        337        0.14       96.52
  10-Mar-21 |        337        0.14       96.66
  11-Mar-21 |        337        0.14       96.80
  12-Mar-21 |        337        0.14       96.94
  13-Mar-21 |        337        0.14       97.08
  14-Mar-21 |        337        0.14       97.22
  15-Mar-21 |        337        0.14       97.36
  16-Mar-21 |        337        0.14       97.50
  17-Mar-21 |        337        0.14       97.64
  18-Mar-21 |        337        0.14       97.77
  19-Mar-21 |        337        0.14       97.91
  20-Mar-21 |        337        0.14       98.05
  21-Mar-21 |        337        0.14       98.19
  22-Mar-21 |        337        0.14       98.33
  23-Mar-21 |        337        0.14       98.47
  24-Mar-21 |        337        0.14       98.61
  25-Mar-21 |        337        0.14       98.75
  26-Mar-21 |        337        0.14       98.89
  27-Mar-21 |        337        0.14       99.03
  28-Mar-21 |        337        0.14       99.17
  29-Mar-21 |        337        0.14       99.30
  30-Mar-21 |        337        0.14       99.44
  31-Mar-21 |        337        0.14       99.58
   1-Apr-21 |        337        0.14       99.72
   2-Apr-21 |        337        0.14       99.86
   3-Apr-21 |        337        0.14      100.00
------------+-----------------------------------
      Total |    242,303      100.00

. ** 242,303 Observations. 337 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ** Generate a week variable
. drop week

. gen int week = floor((date-td(31dec2018))/7)+1

. la var week "Week"

. 
. ** Generate a month variable which goes from the 16th of each month to the 15th of the next month. 
. ** This definition of month aligns with the implementation of ETS market in its initial Stages. 
. ** Nick Cox's code:
. drop month16

. gen month16 = date if day(date) == 16
(234,215 missing values generated)

. //      replace month16 = mdy(1, 16, 2019) in 1
. replace month16 = month16[_n-1] if missing(month16)
(234,215 real changes made)

. la var month16 "Month, defined as 16th of this month to 15th of next month"

. gen month16_sif = month16

. format month16 %tddd-Mon-YY

. la var month16_sif "[SIF] Month-year. For convenience."

. order month16_sif, a(month16)

. sort composite_id date

. ** Check days in each month for one device. Looks good.
. *tab month16 if composite_id == "GJSRT100740111"
. 
. ** Generate Dummy for Interregnum period of market
. ** Covid lockdown -- 23 March 2020 to 11 October 2021. 
. ** Mock-III started on 12 October 2021.
. gen D_interregnum_week = week >= 65 & week <= 93

. replace D_interregnum_week =1 if week == 99 | week == 100
(4,718 real changes made)

. la var D_interregnum_week ///
>         "[Week-level] =1 if Interregnum due to Covid-19 lockdown, zero otherwise."

. 
. drop extinct_with_assignment removed_from_sample comment

. 
. ** Remove plants that have no observation from 16-Apr-19 to 03-Apr-21.
. bysort gpcb_id: egen pct_report = mean(!missing(pm_mass_rule0)) if ///
>         month16 >= date("2019jul16", "YMD") & D_interregnum_week == 0
(103,796 missing values generated)

. sort composite_id date

. bysort gpcb_id: egen pct_report_1 = mean(pct_report)

. drop if pct_report_1 == 0
(19,413 observations deleted)

. drop pct_report pct_report_1

. sort composite_id date  

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        310        0.14        0.14
  17-Apr-19 |        310        0.14        0.28
  18-Apr-19 |        310        0.14        0.42
  19-Apr-19 |        310        0.14        0.56
  20-Apr-19 |        310        0.14        0.70
  21-Apr-19 |        310        0.14        0.83
  22-Apr-19 |        310        0.14        0.97
  23-Apr-19 |        310        0.14        1.11
  24-Apr-19 |        310        0.14        1.25
  25-Apr-19 |        310        0.14        1.39
  26-Apr-19 |        310        0.14        1.53
  27-Apr-19 |        310        0.14        1.67
  28-Apr-19 |        310        0.14        1.81
  29-Apr-19 |        310        0.14        1.95
  30-Apr-19 |        310        0.14        2.09
   1-May-19 |        310        0.14        2.23
   2-May-19 |        310        0.14        2.36
   3-May-19 |        310        0.14        2.50
   4-May-19 |        310        0.14        2.64
   5-May-19 |        310        0.14        2.78
   6-May-19 |        310        0.14        2.92
   7-May-19 |        310        0.14        3.06
   8-May-19 |        310        0.14        3.20
   9-May-19 |        310        0.14        3.34
  10-May-19 |        310        0.14        3.48
  11-May-19 |        310        0.14        3.62
  12-May-19 |        310        0.14        3.76
  13-May-19 |        310        0.14        3.89
  14-May-19 |        310        0.14        4.03
  15-May-19 |        310        0.14        4.17
  16-May-19 |        310        0.14        4.31
  17-May-19 |        310        0.14        4.45
  18-May-19 |        310        0.14        4.59
  19-May-19 |        310        0.14        4.73
  20-May-19 |        310        0.14        4.87
  21-May-19 |        310        0.14        5.01
  22-May-19 |        310        0.14        5.15
  23-May-19 |        310        0.14        5.29
  24-May-19 |        310        0.14        5.42
  25-May-19 |        310        0.14        5.56
  26-May-19 |        310        0.14        5.70
  27-May-19 |        310        0.14        5.84
  28-May-19 |        310        0.14        5.98
  29-May-19 |        310        0.14        6.12
  30-May-19 |        310        0.14        6.26
  31-May-19 |        310        0.14        6.40
   1-Jun-19 |        310        0.14        6.54
   2-Jun-19 |        310        0.14        6.68
   3-Jun-19 |        310        0.14        6.82
   4-Jun-19 |        310        0.14        6.95
   5-Jun-19 |        310        0.14        7.09
   6-Jun-19 |        310        0.14        7.23
   7-Jun-19 |        310        0.14        7.37
   8-Jun-19 |        310        0.14        7.51
   9-Jun-19 |        310        0.14        7.65
  10-Jun-19 |        310        0.14        7.79
  11-Jun-19 |        310        0.14        7.93
  12-Jun-19 |        310        0.14        8.07
  13-Jun-19 |        310        0.14        8.21
  14-Jun-19 |        310        0.14        8.34
  15-Jun-19 |        310        0.14        8.48
  16-Jun-19 |        310        0.14        8.62
  17-Jun-19 |        310        0.14        8.76
  18-Jun-19 |        310        0.14        8.90
  19-Jun-19 |        310        0.14        9.04
  20-Jun-19 |        310        0.14        9.18
  21-Jun-19 |        310        0.14        9.32
  22-Jun-19 |        310        0.14        9.46
  23-Jun-19 |        310        0.14        9.60
  24-Jun-19 |        310        0.14        9.74
  25-Jun-19 |        310        0.14        9.87
  26-Jun-19 |        310        0.14       10.01
  27-Jun-19 |        310        0.14       10.15
  28-Jun-19 |        310        0.14       10.29
  29-Jun-19 |        310        0.14       10.43
  30-Jun-19 |        310        0.14       10.57
   1-Jul-19 |        310        0.14       10.71
   2-Jul-19 |        310        0.14       10.85
   3-Jul-19 |        310        0.14       10.99
   4-Jul-19 |        310        0.14       11.13
   5-Jul-19 |        310        0.14       11.27
   6-Jul-19 |        310        0.14       11.40
   7-Jul-19 |        310        0.14       11.54
   8-Jul-19 |        310        0.14       11.68
   9-Jul-19 |        310        0.14       11.82
  10-Jul-19 |        310        0.14       11.96
  11-Jul-19 |        310        0.14       12.10
  12-Jul-19 |        310        0.14       12.24
  13-Jul-19 |        310        0.14       12.38
  14-Jul-19 |        310        0.14       12.52
  15-Jul-19 |        310        0.14       12.66
  16-Jul-19 |        310        0.14       12.80
  17-Jul-19 |        310        0.14       12.93
  18-Jul-19 |        310        0.14       13.07
  19-Jul-19 |        310        0.14       13.21
  20-Jul-19 |        310        0.14       13.35
  21-Jul-19 |        310        0.14       13.49
  22-Jul-19 |        310        0.14       13.63
  23-Jul-19 |        310        0.14       13.77
  24-Jul-19 |        310        0.14       13.91
  25-Jul-19 |        310        0.14       14.05
  26-Jul-19 |        310        0.14       14.19
  27-Jul-19 |        310        0.14       14.33
  28-Jul-19 |        310        0.14       14.46
  29-Jul-19 |        310        0.14       14.60
  30-Jul-19 |        310        0.14       14.74
  31-Jul-19 |        310        0.14       14.88
   1-Aug-19 |        310        0.14       15.02
   2-Aug-19 |        310        0.14       15.16
   3-Aug-19 |        310        0.14       15.30
   4-Aug-19 |        310        0.14       15.44
   5-Aug-19 |        310        0.14       15.58
   6-Aug-19 |        310        0.14       15.72
   7-Aug-19 |        310        0.14       15.86
   8-Aug-19 |        310        0.14       15.99
   9-Aug-19 |        310        0.14       16.13
  10-Aug-19 |        310        0.14       16.27
  11-Aug-19 |        310        0.14       16.41
  12-Aug-19 |        310        0.14       16.55
  13-Aug-19 |        310        0.14       16.69
  14-Aug-19 |        310        0.14       16.83
  15-Aug-19 |        310        0.14       16.97
  16-Aug-19 |        310        0.14       17.11
  17-Aug-19 |        310        0.14       17.25
  18-Aug-19 |        310        0.14       17.39
  19-Aug-19 |        310        0.14       17.52
  20-Aug-19 |        310        0.14       17.66
  21-Aug-19 |        310        0.14       17.80
  22-Aug-19 |        310        0.14       17.94
  23-Aug-19 |        310        0.14       18.08
  24-Aug-19 |        310        0.14       18.22
  25-Aug-19 |        310        0.14       18.36
  26-Aug-19 |        310        0.14       18.50
  27-Aug-19 |        310        0.14       18.64
  28-Aug-19 |        310        0.14       18.78
  29-Aug-19 |        310        0.14       18.92
  30-Aug-19 |        310        0.14       19.05
  31-Aug-19 |        310        0.14       19.19
   1-Sep-19 |        310        0.14       19.33
   2-Sep-19 |        310        0.14       19.47
   3-Sep-19 |        310        0.14       19.61
   4-Sep-19 |        310        0.14       19.75
   5-Sep-19 |        310        0.14       19.89
   6-Sep-19 |        310        0.14       20.03
   7-Sep-19 |        310        0.14       20.17
   8-Sep-19 |        310        0.14       20.31
   9-Sep-19 |        310        0.14       20.45
  10-Sep-19 |        310        0.14       20.58
  11-Sep-19 |        310        0.14       20.72
  12-Sep-19 |        310        0.14       20.86
  13-Sep-19 |        310        0.14       21.00
  14-Sep-19 |        310        0.14       21.14
  15-Sep-19 |        310        0.14       21.28
  16-Sep-19 |        310        0.14       21.42
  17-Sep-19 |        310        0.14       21.56
  18-Sep-19 |        310        0.14       21.70
  19-Sep-19 |        310        0.14       21.84
  20-Sep-19 |        310        0.14       21.97
  21-Sep-19 |        310        0.14       22.11
  22-Sep-19 |        310        0.14       22.25
  23-Sep-19 |        310        0.14       22.39
  24-Sep-19 |        310        0.14       22.53
  25-Sep-19 |        310        0.14       22.67
  26-Sep-19 |        310        0.14       22.81
  27-Sep-19 |        310        0.14       22.95
  28-Sep-19 |        310        0.14       23.09
  29-Sep-19 |        310        0.14       23.23
  30-Sep-19 |        310        0.14       23.37
   1-Oct-19 |        310        0.14       23.50
   2-Oct-19 |        310        0.14       23.64
   3-Oct-19 |        310        0.14       23.78
   4-Oct-19 |        310        0.14       23.92
   5-Oct-19 |        310        0.14       24.06
   6-Oct-19 |        310        0.14       24.20
   7-Oct-19 |        310        0.14       24.34
   8-Oct-19 |        310        0.14       24.48
   9-Oct-19 |        310        0.14       24.62
  10-Oct-19 |        310        0.14       24.76
  11-Oct-19 |        310        0.14       24.90
  12-Oct-19 |        310        0.14       25.03
  13-Oct-19 |        310        0.14       25.17
  14-Oct-19 |        310        0.14       25.31
  15-Oct-19 |        310        0.14       25.45
  16-Oct-19 |        310        0.14       25.59
  17-Oct-19 |        310        0.14       25.73
  18-Oct-19 |        310        0.14       25.87
  19-Oct-19 |        310        0.14       26.01
  20-Oct-19 |        310        0.14       26.15
  21-Oct-19 |        310        0.14       26.29
  22-Oct-19 |        310        0.14       26.43
  23-Oct-19 |        310        0.14       26.56
  24-Oct-19 |        310        0.14       26.70
  25-Oct-19 |        310        0.14       26.84
  26-Oct-19 |        310        0.14       26.98
  27-Oct-19 |        310        0.14       27.12
  28-Oct-19 |        310        0.14       27.26
  29-Oct-19 |        310        0.14       27.40
  30-Oct-19 |        310        0.14       27.54
  31-Oct-19 |        310        0.14       27.68
   1-Nov-19 |        310        0.14       27.82
   2-Nov-19 |        310        0.14       27.96
   3-Nov-19 |        310        0.14       28.09
   4-Nov-19 |        310        0.14       28.23
   5-Nov-19 |        310        0.14       28.37
   6-Nov-19 |        310        0.14       28.51
   7-Nov-19 |        310        0.14       28.65
   8-Nov-19 |        310        0.14       28.79
   9-Nov-19 |        310        0.14       28.93
  10-Nov-19 |        310        0.14       29.07
  11-Nov-19 |        310        0.14       29.21
  12-Nov-19 |        310        0.14       29.35
  13-Nov-19 |        310        0.14       29.49
  14-Nov-19 |        310        0.14       29.62
  15-Nov-19 |        310        0.14       29.76
  16-Nov-19 |        310        0.14       29.90
  17-Nov-19 |        310        0.14       30.04
  18-Nov-19 |        310        0.14       30.18
  19-Nov-19 |        310        0.14       30.32
  20-Nov-19 |        310        0.14       30.46
  21-Nov-19 |        310        0.14       30.60
  22-Nov-19 |        310        0.14       30.74
  23-Nov-19 |        310        0.14       30.88
  24-Nov-19 |        310        0.14       31.02
  25-Nov-19 |        310        0.14       31.15
  26-Nov-19 |        310        0.14       31.29
  27-Nov-19 |        310        0.14       31.43
  28-Nov-19 |        310        0.14       31.57
  29-Nov-19 |        310        0.14       31.71
  30-Nov-19 |        310        0.14       31.85
   1-Dec-19 |        310        0.14       31.99
   2-Dec-19 |        310        0.14       32.13
   3-Dec-19 |        310        0.14       32.27
   4-Dec-19 |        310        0.14       32.41
   5-Dec-19 |        310        0.14       32.55
   6-Dec-19 |        310        0.14       32.68
   7-Dec-19 |        310        0.14       32.82
   8-Dec-19 |        310        0.14       32.96
   9-Dec-19 |        310        0.14       33.10
  10-Dec-19 |        310        0.14       33.24
  11-Dec-19 |        310        0.14       33.38
  12-Dec-19 |        310        0.14       33.52
  13-Dec-19 |        310        0.14       33.66
  14-Dec-19 |        310        0.14       33.80
  15-Dec-19 |        310        0.14       33.94
  16-Dec-19 |        310        0.14       34.08
  17-Dec-19 |        310        0.14       34.21
  18-Dec-19 |        310        0.14       34.35
  19-Dec-19 |        310        0.14       34.49
  20-Dec-19 |        310        0.14       34.63
  21-Dec-19 |        310        0.14       34.77
  22-Dec-19 |        310        0.14       34.91
  23-Dec-19 |        310        0.14       35.05
  24-Dec-19 |        310        0.14       35.19
  25-Dec-19 |        310        0.14       35.33
  26-Dec-19 |        310        0.14       35.47
  27-Dec-19 |        310        0.14       35.61
  28-Dec-19 |        310        0.14       35.74
  29-Dec-19 |        310        0.14       35.88
  30-Dec-19 |        310        0.14       36.02
  31-Dec-19 |        310        0.14       36.16
   1-Jan-20 |        310        0.14       36.30
   2-Jan-20 |        310        0.14       36.44
   3-Jan-20 |        310        0.14       36.58
   4-Jan-20 |        310        0.14       36.72
   5-Jan-20 |        310        0.14       36.86
   6-Jan-20 |        310        0.14       37.00
   7-Jan-20 |        310        0.14       37.13
   8-Jan-20 |        310        0.14       37.27
   9-Jan-20 |        310        0.14       37.41
  10-Jan-20 |        310        0.14       37.55
  11-Jan-20 |        310        0.14       37.69
  12-Jan-20 |        310        0.14       37.83
  13-Jan-20 |        310        0.14       37.97
  14-Jan-20 |        310        0.14       38.11
  15-Jan-20 |        310        0.14       38.25
  16-Jan-20 |        310        0.14       38.39
  17-Jan-20 |        310        0.14       38.53
  18-Jan-20 |        310        0.14       38.66
  19-Jan-20 |        310        0.14       38.80
  20-Jan-20 |        310        0.14       38.94
  21-Jan-20 |        310        0.14       39.08
  22-Jan-20 |        310        0.14       39.22
  23-Jan-20 |        310        0.14       39.36
  24-Jan-20 |        310        0.14       39.50
  25-Jan-20 |        310        0.14       39.64
  26-Jan-20 |        310        0.14       39.78
  27-Jan-20 |        310        0.14       39.92
  28-Jan-20 |        310        0.14       40.06
  29-Jan-20 |        310        0.14       40.19
  30-Jan-20 |        310        0.14       40.33
  31-Jan-20 |        310        0.14       40.47
   1-Feb-20 |        310        0.14       40.61
   2-Feb-20 |        310        0.14       40.75
   3-Feb-20 |        310        0.14       40.89
   4-Feb-20 |        310        0.14       41.03
   5-Feb-20 |        310        0.14       41.17
   6-Feb-20 |        310        0.14       41.31
   7-Feb-20 |        310        0.14       41.45
   8-Feb-20 |        310        0.14       41.59
   9-Feb-20 |        310        0.14       41.72
  10-Feb-20 |        310        0.14       41.86
  11-Feb-20 |        310        0.14       42.00
  12-Feb-20 |        310        0.14       42.14
  13-Feb-20 |        310        0.14       42.28
  14-Feb-20 |        310        0.14       42.42
  15-Feb-20 |        310        0.14       42.56
  16-Feb-20 |        310        0.14       42.70
  17-Feb-20 |        310        0.14       42.84
  18-Feb-20 |        310        0.14       42.98
  19-Feb-20 |        310        0.14       43.12
  20-Feb-20 |        310        0.14       43.25
  21-Feb-20 |        310        0.14       43.39
  22-Feb-20 |        310        0.14       43.53
  23-Feb-20 |        310        0.14       43.67
  24-Feb-20 |        310        0.14       43.81
  25-Feb-20 |        310        0.14       43.95
  26-Feb-20 |        310        0.14       44.09
  27-Feb-20 |        310        0.14       44.23
  28-Feb-20 |        310        0.14       44.37
  29-Feb-20 |        310        0.14       44.51
   1-Mar-20 |        310        0.14       44.65
   2-Mar-20 |        310        0.14       44.78
   3-Mar-20 |        310        0.14       44.92
   4-Mar-20 |        310        0.14       45.06
   5-Mar-20 |        310        0.14       45.20
   6-Mar-20 |        310        0.14       45.34
   7-Mar-20 |        310        0.14       45.48
   8-Mar-20 |        310        0.14       45.62
   9-Mar-20 |        310        0.14       45.76
  10-Mar-20 |        310        0.14       45.90
  11-Mar-20 |        310        0.14       46.04
  12-Mar-20 |        310        0.14       46.18
  13-Mar-20 |        310        0.14       46.31
  14-Mar-20 |        310        0.14       46.45
  15-Mar-20 |        310        0.14       46.59
  16-Mar-20 |        310        0.14       46.73
  17-Mar-20 |        310        0.14       46.87
  18-Mar-20 |        310        0.14       47.01
  19-Mar-20 |        310        0.14       47.15
  20-Mar-20 |        310        0.14       47.29
  21-Mar-20 |        310        0.14       47.43
  22-Mar-20 |        310        0.14       47.57
  23-Mar-20 |        310        0.14       47.71
  24-Mar-20 |        310        0.14       47.84
  25-Mar-20 |        310        0.14       47.98
  26-Mar-20 |        310        0.14       48.12
  27-Mar-20 |        310        0.14       48.26
  28-Mar-20 |        310        0.14       48.40
  29-Mar-20 |        310        0.14       48.54
  30-Mar-20 |        310        0.14       48.68
  31-Mar-20 |        310        0.14       48.82
   1-Apr-20 |        310        0.14       48.96
   2-Apr-20 |        310        0.14       49.10
   3-Apr-20 |        310        0.14       49.24
   4-Apr-20 |        310        0.14       49.37
   5-Apr-20 |        310        0.14       49.51
   6-Apr-20 |        310        0.14       49.65
   7-Apr-20 |        310        0.14       49.79
   8-Apr-20 |        310        0.14       49.93
   9-Apr-20 |        310        0.14       50.07
  10-Apr-20 |        310        0.14       50.21
  11-Apr-20 |        310        0.14       50.35
  12-Apr-20 |        310        0.14       50.49
  13-Apr-20 |        310        0.14       50.63
  14-Apr-20 |        310        0.14       50.76
  15-Apr-20 |        310        0.14       50.90
  16-Apr-20 |        310        0.14       51.04
  17-Apr-20 |        310        0.14       51.18
  18-Apr-20 |        310        0.14       51.32
  19-Apr-20 |        310        0.14       51.46
  20-Apr-20 |        310        0.14       51.60
  21-Apr-20 |        310        0.14       51.74
  22-Apr-20 |        310        0.14       51.88
  23-Apr-20 |        310        0.14       52.02
  24-Apr-20 |        310        0.14       52.16
  25-Apr-20 |        310        0.14       52.29
  26-Apr-20 |        310        0.14       52.43
  27-Apr-20 |        310        0.14       52.57
  28-Apr-20 |        310        0.14       52.71
  29-Apr-20 |        310        0.14       52.85
  30-Apr-20 |        310        0.14       52.99
   1-May-20 |        310        0.14       53.13
   2-May-20 |        310        0.14       53.27
   3-May-20 |        310        0.14       53.41
   4-May-20 |        310        0.14       53.55
   5-May-20 |        310        0.14       53.69
   6-May-20 |        310        0.14       53.82
   7-May-20 |        310        0.14       53.96
   8-May-20 |        310        0.14       54.10
   9-May-20 |        310        0.14       54.24
  10-May-20 |        310        0.14       54.38
  11-May-20 |        310        0.14       54.52
  12-May-20 |        310        0.14       54.66
  13-May-20 |        310        0.14       54.80
  14-May-20 |        310        0.14       54.94
  15-May-20 |        310        0.14       55.08
  16-May-20 |        310        0.14       55.22
  17-May-20 |        310        0.14       55.35
  18-May-20 |        310        0.14       55.49
  19-May-20 |        310        0.14       55.63
  20-May-20 |        310        0.14       55.77
  21-May-20 |        310        0.14       55.91
  22-May-20 |        310        0.14       56.05
  23-May-20 |        310        0.14       56.19
  24-May-20 |        310        0.14       56.33
  25-May-20 |        310        0.14       56.47
  26-May-20 |        310        0.14       56.61
  27-May-20 |        310        0.14       56.75
  28-May-20 |        310        0.14       56.88
  29-May-20 |        310        0.14       57.02
  30-May-20 |        310        0.14       57.16
  31-May-20 |        310        0.14       57.30
   1-Jun-20 |        310        0.14       57.44
   2-Jun-20 |        310        0.14       57.58
   3-Jun-20 |        310        0.14       57.72
   4-Jun-20 |        310        0.14       57.86
   5-Jun-20 |        310        0.14       58.00
   6-Jun-20 |        310        0.14       58.14
   7-Jun-20 |        310        0.14       58.28
   8-Jun-20 |        310        0.14       58.41
   9-Jun-20 |        310        0.14       58.55
  10-Jun-20 |        310        0.14       58.69
  11-Jun-20 |        310        0.14       58.83
  12-Jun-20 |        310        0.14       58.97
  13-Jun-20 |        310        0.14       59.11
  14-Jun-20 |        310        0.14       59.25
  15-Jun-20 |        310        0.14       59.39
  16-Jun-20 |        310        0.14       59.53
  17-Jun-20 |        310        0.14       59.67
  18-Jun-20 |        310        0.14       59.81
  19-Jun-20 |        310        0.14       59.94
  20-Jun-20 |        310        0.14       60.08
  21-Jun-20 |        310        0.14       60.22
  22-Jun-20 |        310        0.14       60.36
  23-Jun-20 |        310        0.14       60.50
  24-Jun-20 |        310        0.14       60.64
  25-Jun-20 |        310        0.14       60.78
  26-Jun-20 |        310        0.14       60.92
  27-Jun-20 |        310        0.14       61.06
  28-Jun-20 |        310        0.14       61.20
  29-Jun-20 |        310        0.14       61.34
  30-Jun-20 |        310        0.14       61.47
   1-Jul-20 |        310        0.14       61.61
   2-Jul-20 |        310        0.14       61.75
   3-Jul-20 |        310        0.14       61.89
   4-Jul-20 |        310        0.14       62.03
   5-Jul-20 |        310        0.14       62.17
   6-Jul-20 |        310        0.14       62.31
   7-Jul-20 |        310        0.14       62.45
   8-Jul-20 |        310        0.14       62.59
   9-Jul-20 |        310        0.14       62.73
  10-Jul-20 |        310        0.14       62.87
  11-Jul-20 |        310        0.14       63.00
  12-Jul-20 |        310        0.14       63.14
  13-Jul-20 |        310        0.14       63.28
  14-Jul-20 |        310        0.14       63.42
  15-Jul-20 |        310        0.14       63.56
  16-Jul-20 |        310        0.14       63.70
  17-Jul-20 |        310        0.14       63.84
  18-Jul-20 |        310        0.14       63.98
  19-Jul-20 |        310        0.14       64.12
  20-Jul-20 |        310        0.14       64.26
  21-Jul-20 |        310        0.14       64.39
  22-Jul-20 |        310        0.14       64.53
  23-Jul-20 |        310        0.14       64.67
  24-Jul-20 |        310        0.14       64.81
  25-Jul-20 |        310        0.14       64.95
  26-Jul-20 |        310        0.14       65.09
  27-Jul-20 |        310        0.14       65.23
  28-Jul-20 |        310        0.14       65.37
  29-Jul-20 |        310        0.14       65.51
  30-Jul-20 |        310        0.14       65.65
  31-Jul-20 |        310        0.14       65.79
   1-Aug-20 |        310        0.14       65.92
   2-Aug-20 |        310        0.14       66.06
   3-Aug-20 |        310        0.14       66.20
   4-Aug-20 |        310        0.14       66.34
   5-Aug-20 |        310        0.14       66.48
   6-Aug-20 |        310        0.14       66.62
   7-Aug-20 |        310        0.14       66.76
   8-Aug-20 |        310        0.14       66.90
   9-Aug-20 |        310        0.14       67.04
  10-Aug-20 |        310        0.14       67.18
  11-Aug-20 |        310        0.14       67.32
  12-Aug-20 |        310        0.14       67.45
  13-Aug-20 |        310        0.14       67.59
  14-Aug-20 |        310        0.14       67.73
  15-Aug-20 |        310        0.14       67.87
  16-Aug-20 |        310        0.14       68.01
  17-Aug-20 |        310        0.14       68.15
  18-Aug-20 |        310        0.14       68.29
  19-Aug-20 |        310        0.14       68.43
  20-Aug-20 |        310        0.14       68.57
  21-Aug-20 |        310        0.14       68.71
  22-Aug-20 |        310        0.14       68.85
  23-Aug-20 |        310        0.14       68.98
  24-Aug-20 |        310        0.14       69.12
  25-Aug-20 |        310        0.14       69.26
  26-Aug-20 |        310        0.14       69.40
  27-Aug-20 |        310        0.14       69.54
  28-Aug-20 |        310        0.14       69.68
  29-Aug-20 |        310        0.14       69.82
  30-Aug-20 |        310        0.14       69.96
  31-Aug-20 |        310        0.14       70.10
   1-Sep-20 |        310        0.14       70.24
   2-Sep-20 |        310        0.14       70.38
   3-Sep-20 |        310        0.14       70.51
   4-Sep-20 |        310        0.14       70.65
   5-Sep-20 |        310        0.14       70.79
   6-Sep-20 |        310        0.14       70.93
   7-Sep-20 |        310        0.14       71.07
   8-Sep-20 |        310        0.14       71.21
   9-Sep-20 |        310        0.14       71.35
  10-Sep-20 |        310        0.14       71.49
  11-Sep-20 |        310        0.14       71.63
  12-Sep-20 |        310        0.14       71.77
  13-Sep-20 |        310        0.14       71.91
  14-Sep-20 |        310        0.14       72.04
  15-Sep-20 |        310        0.14       72.18
  16-Sep-20 |        310        0.14       72.32
  17-Sep-20 |        310        0.14       72.46
  18-Sep-20 |        310        0.14       72.60
  19-Sep-20 |        310        0.14       72.74
  20-Sep-20 |        310        0.14       72.88
  21-Sep-20 |        310        0.14       73.02
  22-Sep-20 |        310        0.14       73.16
  23-Sep-20 |        310        0.14       73.30
  24-Sep-20 |        310        0.14       73.44
  25-Sep-20 |        310        0.14       73.57
  26-Sep-20 |        310        0.14       73.71
  27-Sep-20 |        310        0.14       73.85
  28-Sep-20 |        310        0.14       73.99
  29-Sep-20 |        310        0.14       74.13
  30-Sep-20 |        310        0.14       74.27
   1-Oct-20 |        310        0.14       74.41
   2-Oct-20 |        310        0.14       74.55
   3-Oct-20 |        310        0.14       74.69
   4-Oct-20 |        310        0.14       74.83
   5-Oct-20 |        310        0.14       74.97
   6-Oct-20 |        310        0.14       75.10
   7-Oct-20 |        310        0.14       75.24
   8-Oct-20 |        310        0.14       75.38
   9-Oct-20 |        310        0.14       75.52
  10-Oct-20 |        310        0.14       75.66
  11-Oct-20 |        310        0.14       75.80
  12-Oct-20 |        310        0.14       75.94
  13-Oct-20 |        310        0.14       76.08
  14-Oct-20 |        310        0.14       76.22
  15-Oct-20 |        310        0.14       76.36
  16-Oct-20 |        310        0.14       76.50
  17-Oct-20 |        310        0.14       76.63
  18-Oct-20 |        310        0.14       76.77
  19-Oct-20 |        310        0.14       76.91
  20-Oct-20 |        310        0.14       77.05
  21-Oct-20 |        310        0.14       77.19
  22-Oct-20 |        310        0.14       77.33
  23-Oct-20 |        310        0.14       77.47
  24-Oct-20 |        310        0.14       77.61
  25-Oct-20 |        310        0.14       77.75
  26-Oct-20 |        310        0.14       77.89
  27-Oct-20 |        310        0.14       78.03
  28-Oct-20 |        310        0.14       78.16
  29-Oct-20 |        310        0.14       78.30
  30-Oct-20 |        310        0.14       78.44
  31-Oct-20 |        310        0.14       78.58
   1-Nov-20 |        310        0.14       78.72
   2-Nov-20 |        310        0.14       78.86
   3-Nov-20 |        310        0.14       79.00
   4-Nov-20 |        310        0.14       79.14
   5-Nov-20 |        310        0.14       79.28
   6-Nov-20 |        310        0.14       79.42
   7-Nov-20 |        310        0.14       79.55
   8-Nov-20 |        310        0.14       79.69
   9-Nov-20 |        310        0.14       79.83
  10-Nov-20 |        310        0.14       79.97
  11-Nov-20 |        310        0.14       80.11
  12-Nov-20 |        310        0.14       80.25
  13-Nov-20 |        310        0.14       80.39
  14-Nov-20 |        310        0.14       80.53
  15-Nov-20 |        310        0.14       80.67
  16-Nov-20 |        310        0.14       80.81
  17-Nov-20 |        310        0.14       80.95
  18-Nov-20 |        310        0.14       81.08
  19-Nov-20 |        310        0.14       81.22
  20-Nov-20 |        310        0.14       81.36
  21-Nov-20 |        310        0.14       81.50
  22-Nov-20 |        310        0.14       81.64
  23-Nov-20 |        310        0.14       81.78
  24-Nov-20 |        310        0.14       81.92
  25-Nov-20 |        310        0.14       82.06
  26-Nov-20 |        310        0.14       82.20
  27-Nov-20 |        310        0.14       82.34
  28-Nov-20 |        310        0.14       82.48
  29-Nov-20 |        310        0.14       82.61
  30-Nov-20 |        310        0.14       82.75
   1-Dec-20 |        310        0.14       82.89
   2-Dec-20 |        310        0.14       83.03
   3-Dec-20 |        310        0.14       83.17
   4-Dec-20 |        310        0.14       83.31
   5-Dec-20 |        310        0.14       83.45
   6-Dec-20 |        310        0.14       83.59
   7-Dec-20 |        310        0.14       83.73
   8-Dec-20 |        310        0.14       83.87
   9-Dec-20 |        310        0.14       84.01
  10-Dec-20 |        310        0.14       84.14
  11-Dec-20 |        310        0.14       84.28
  12-Dec-20 |        310        0.14       84.42
  13-Dec-20 |        310        0.14       84.56
  14-Dec-20 |        310        0.14       84.70
  15-Dec-20 |        310        0.14       84.84
  16-Dec-20 |        310        0.14       84.98
  17-Dec-20 |        310        0.14       85.12
  18-Dec-20 |        310        0.14       85.26
  19-Dec-20 |        310        0.14       85.40
  20-Dec-20 |        310        0.14       85.54
  21-Dec-20 |        310        0.14       85.67
  22-Dec-20 |        310        0.14       85.81
  23-Dec-20 |        310        0.14       85.95
  24-Dec-20 |        310        0.14       86.09
  25-Dec-20 |        310        0.14       86.23
  26-Dec-20 |        310        0.14       86.37
  27-Dec-20 |        310        0.14       86.51
  28-Dec-20 |        310        0.14       86.65
  29-Dec-20 |        310        0.14       86.79
  30-Dec-20 |        310        0.14       86.93
  31-Dec-20 |        310        0.14       87.07
   1-Jan-21 |        310        0.14       87.20
   2-Jan-21 |        310        0.14       87.34
   3-Jan-21 |        310        0.14       87.48
   4-Jan-21 |        310        0.14       87.62
   5-Jan-21 |        310        0.14       87.76
   6-Jan-21 |        310        0.14       87.90
   7-Jan-21 |        310        0.14       88.04
   8-Jan-21 |        310        0.14       88.18
   9-Jan-21 |        310        0.14       88.32
  10-Jan-21 |        310        0.14       88.46
  11-Jan-21 |        310        0.14       88.60
  12-Jan-21 |        310        0.14       88.73
  13-Jan-21 |        310        0.14       88.87
  14-Jan-21 |        310        0.14       89.01
  15-Jan-21 |        310        0.14       89.15
  16-Jan-21 |        310        0.14       89.29
  17-Jan-21 |        310        0.14       89.43
  18-Jan-21 |        310        0.14       89.57
  19-Jan-21 |        310        0.14       89.71
  20-Jan-21 |        310        0.14       89.85
  21-Jan-21 |        310        0.14       89.99
  22-Jan-21 |        310        0.14       90.13
  23-Jan-21 |        310        0.14       90.26
  24-Jan-21 |        310        0.14       90.40
  25-Jan-21 |        310        0.14       90.54
  26-Jan-21 |        310        0.14       90.68
  27-Jan-21 |        310        0.14       90.82
  28-Jan-21 |        310        0.14       90.96
  29-Jan-21 |        310        0.14       91.10
  30-Jan-21 |        310        0.14       91.24
  31-Jan-21 |        310        0.14       91.38
   1-Feb-21 |        310        0.14       91.52
   2-Feb-21 |        310        0.14       91.66
   3-Feb-21 |        310        0.14       91.79
   4-Feb-21 |        310        0.14       91.93
   5-Feb-21 |        310        0.14       92.07
   6-Feb-21 |        310        0.14       92.21
   7-Feb-21 |        310        0.14       92.35
   8-Feb-21 |        310        0.14       92.49
   9-Feb-21 |        310        0.14       92.63
  10-Feb-21 |        310        0.14       92.77
  11-Feb-21 |        310        0.14       92.91
  12-Feb-21 |        310        0.14       93.05
  13-Feb-21 |        310        0.14       93.18
  14-Feb-21 |        310        0.14       93.32
  15-Feb-21 |        310        0.14       93.46
  16-Feb-21 |        310        0.14       93.60
  17-Feb-21 |        310        0.14       93.74
  18-Feb-21 |        310        0.14       93.88
  19-Feb-21 |        310        0.14       94.02
  20-Feb-21 |        310        0.14       94.16
  21-Feb-21 |        310        0.14       94.30
  22-Feb-21 |        310        0.14       94.44
  23-Feb-21 |        310        0.14       94.58
  24-Feb-21 |        310        0.14       94.71
  25-Feb-21 |        310        0.14       94.85
  26-Feb-21 |        310        0.14       94.99
  27-Feb-21 |        310        0.14       95.13
  28-Feb-21 |        310        0.14       95.27
   1-Mar-21 |        310        0.14       95.41
   2-Mar-21 |        310        0.14       95.55
   3-Mar-21 |        310        0.14       95.69
   4-Mar-21 |        310        0.14       95.83
   5-Mar-21 |        310        0.14       95.97
   6-Mar-21 |        310        0.14       96.11
   7-Mar-21 |        310        0.14       96.24
   8-Mar-21 |        310        0.14       96.38
   9-Mar-21 |        310        0.14       96.52
  10-Mar-21 |        310        0.14       96.66
  11-Mar-21 |        310        0.14       96.80
  12-Mar-21 |        310        0.14       96.94
  13-Mar-21 |        310        0.14       97.08
  14-Mar-21 |        310        0.14       97.22
  15-Mar-21 |        310        0.14       97.36
  16-Mar-21 |        310        0.14       97.50
  17-Mar-21 |        310        0.14       97.64
  18-Mar-21 |        310        0.14       97.77
  19-Mar-21 |        310        0.14       97.91
  20-Mar-21 |        310        0.14       98.05
  21-Mar-21 |        310        0.14       98.19
  22-Mar-21 |        310        0.14       98.33
  23-Mar-21 |        310        0.14       98.47
  24-Mar-21 |        310        0.14       98.61
  25-Mar-21 |        310        0.14       98.75
  26-Mar-21 |        310        0.14       98.89
  27-Mar-21 |        310        0.14       99.03
  28-Mar-21 |        310        0.14       99.17
  29-Mar-21 |        310        0.14       99.30
  30-Mar-21 |        310        0.14       99.44
  31-Mar-21 |        310        0.14       99.58
   1-Apr-21 |        310        0.14       99.72
   2-Apr-21 |        310        0.14       99.86
   3-Apr-21 |        310        0.14      100.00
------------+-----------------------------------
      Total |    222,890      100.00

. ** 222,890 Observations. 310 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ********************************************************************************
. ********************* [1] CALCULATE ACTUAL STACK DAY MASS **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Replace tot_report_hrs to zero 
.         ** if the stack was not sending a valid caliberated stack-day kg/hr that day
.         gen tot_report_hrs_rule`i' = tot_report_hrs
  3.         replace tot_report_hrs_rule`i' = 0 if D_vctransmitting_rule`i' == 0
  4.         label var tot_report_hrs_rule`i' ///
>                 "[RE-LABELED] Stack-day VALID CALIBRATED Reporting Hours from CEMS - rule `i'"
  5. 
.         ** Calculate DAILY actual mass emissions using CEMA Day Reporting Hours
.         gen stack_daily_mass_actual_rule`i' = pm_mass_rule`i' * tot_report_hrs_rule`i'
  6.         la var stack_daily_mass_actual_rule`i' ///
>                 "Stack Day Actual Mass Emissions (kg) from CEMS Reported Hours - rule `i'"
  7. 
. }
(13,811 real changes made)
(92,469 missing values generated)
(13,152 real changes made)
(91,810 missing values generated)
(51,885 real changes made)
(130,543 missing values generated)
(51,410 real changes made)
(130,068 missing values generated)
(72,276 real changes made)
(150,934 missing values generated)
(71,909 real changes made)
(150,567 missing values generated)
(61,133 real changes made)
(139,791 missing values generated)
(60,702 real changes made)
(139,360 missing values generated)
(30,334 real changes made)
(108,992 missing values generated)
(29,748 real changes made)
(108,406 missing values generated)

. 
. ********************************************************************************
. ***************** [2] DAILY NON-REPORTING HOURS FOR IMPUTATION *****************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate DAILY non-reporting hours for imputation
.         gen daily_nonreport_hrs_rule`i' = 24 - tot_report_hrs_rule`i'
  3.         order daily_nonreport_hrs_rule`i', a(tot_report_hrs_rule`i')
  4.         la var daily_nonreport_hrs_rule`i' ///
>                 "Stack Day NON-Reporting Hours - CEMS - rule `i'"
  5. 
. }

. 
. ********************************************************************************
. ********* [3] For Imp: GENERATE STACK'S OWN WEEK and MONTH MEAN KG/HR **********
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate stack's own week mean kg/hr for missing pm mass values
.         bysort composite_id week: egen week_mean_mass_rule`i' = mean(pm_mass_rule`i')
  3.         label var week_mean_mass_rule`i' "Stack Week Mean kg/hr - rule `i'"
  4. 
.         ** Calculate stack's own experiment mean kg/hr for stacks missing entire week of pm mass
.         bysort composite_id: egen stack_mean_mass_rule`i' = mean(pm_mass_rule`i') if ///
>                 (date >= td(16Jul2019)) & (D_interregnum_week == 0)
  5.         la var stack_mean_mass_rule`i' "Stack Experiment Mean kg/hr - rule `i'"
  6. 
. }
(77,721 missing values generated)
(95,480 missing values generated)
(77,182 missing values generated)
(95,480 missing values generated)
(119,617 missing values generated)
(138,635 missing values generated)
(119,246 missing values generated)
(138,635 missing values generated)
(141,866 missing values generated)
(157,952 missing values generated)
(141,642 missing values generated)
(157,952 missing values generated)
(129,965 missing values generated)
(147,677 missing values generated)
(129,650 missing values generated)
(147,677 missing values generated)
(96,226 missing values generated)
(118,907 missing values generated)
(95,778 missing values generated)
(118,907 missing values generated)

. 
. /*******************************************************************************
>            NOW READY FOR IMPUTATION RULE 0b.
>            THE IMPLEMENTATION OF THIS RULE WILL BE:
> 
>            1)   IMPUTE STACK'S OWN WEEK MEAN PM_MASS (KG/HR) FOR ALL MISSING VALUES
>            OF STACK DAY PM_MASS (KG/HR). 
>            2)   IF WEEK MEAN KG/HR IS MISSING, IMPUTE EXPERIMENT MEAN PM_MASS (KG/HR)
>            3)   THE FINAL EMISSION QUANTITY IS:
> 
>            VALIDATED STACK MASS (KG) = 
>            ACTUAL STACK MASS (KG) USING CEMS REPORTED HOURS +
>            IMPUTED STACK MASS (KG) USING CEMS NON-REPORTED HOURS
>    ****************************************************************************/
. 
. 
. 
. ********************************************************************************
. ******************** [4] CALCULATE DAILY STACK IMPUTED MASS ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate PER DAY imputed emissions
.         gen stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * week_mean_mass_rule`i'
  3.         replace stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * stack_mean_mass_rule`i' ///
>                 if week_mean_mass_rule`i' == .
  4.         la var stack_daily_mass_imp_rule`i' ///
>                 "Stack-day Imputed Mass Emissions (kg) from CEMS Non-Reported Hours - rule`i'"
  5. 
.         ** Correct for week of Diwali 2019 when imputation should be zero.
.         replace stack_daily_mass_imp_rule`i' = 0 if ///
>                 date >= date("2019oct26", "YMD") & ///
>                 date <= date("2019nov03", "YMD") & ///
>                 stack_daily_mass_imp_rule`i' != .
  6. 
. }
(77,721 missing values generated)
(26,370 real changes made)
(1,899 real changes made)
(77,182 missing values generated)
(26,014 real changes made)
(1,887 real changes made)
(119,617 missing values generated)
(14,052 real changes made)
(1,203 real changes made)
(119,246 missing values generated)
(13,807 real changes made)
(1,198 real changes made)
(141,866 missing values generated)
(11,142 real changes made)
(976 real changes made)
(141,642 missing values generated)
(10,967 real changes made)
(971 real changes made)
(129,965 missing values generated)
(12,520 real changes made)
(1,093 real changes made)
(129,650 missing values generated)
(12,304 real changes made)
(1,088 real changes made)
(96,226 missing values generated)
(16,436 real changes made)
(1,489 real changes made)
(95,778 missing values generated)
(16,143 real changes made)
(1,478 real changes made)

. 
. ********************************************************************************
. ******************* [5] CALCULATE DAILY STACK VALIDATED MASS *******************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate validated DAY emissions per stack
.         gen stack_daily_mass_val_rule`i' = stack_daily_mass_actual_rule`i' + stack_daily_mass_imp_rule`i'
  3.         replace stack_daily_mass_val_rule`i' = stack_daily_mass_imp_rule`i' ///
>                 if stack_daily_mass_val_rule`i' == .
  4.         la var stack_daily_mass_val_rule`i' ///
>                 "Stack Day Validated Mass Emissions (kg) (=Stack-day Actual + Stack-day Imp) - rule `i'"
  5. 
. }
(92,469 missing values generated)
(41,118 real changes made)
note: label truncated to 80 characters
(91,810 missing values generated)
(40,642 real changes made)
note: label truncated to 80 characters
(130,543 missing values generated)
(24,978 real changes made)
note: label truncated to 80 characters
(130,068 missing values generated)
(24,629 real changes made)
note: label truncated to 80 characters
(150,934 missing values generated)
(20,210 real changes made)
note: label truncated to 80 characters
(150,567 missing values generated)
(19,892 real changes made)
note: label truncated to 80 characters
(139,791 missing values generated)
(22,346 real changes made)
note: label truncated to 80 characters
(139,360 missing values generated)
(22,014 real changes made)
note: label truncated to 80 characters
(108,992 missing values generated)
(29,202 real changes made)
note: label truncated to 80 characters
(108,406 missing values generated)
(28,771 real changes made)
note: label truncated to 80 characters

. 
. preserve

. keep date composite_id gpcb_id treatmentstatus stack_mean_mass_rule0 stack_daily_mass_actual_rule0 stack_daily_mass_imp_rule0 stack_daily_mass_val_rule0

. order date composite_id gpcb_id treatmentstatus stack_mean_mass_rule0 stack_daily_mass_actual_rule0 stack_daily_mass_imp_rule0 stack_daily_mass_val_rule0

. rename stack_mean_mass_rule0 mass_rate_imp_A

. rename stack_daily_mass_actual_rule0 stack_daily_mass_actual_A

. rename stack_daily_mass_imp_rule0 stack_daily_mass_imp_A

. rename stack_daily_mass_val_rule0 stack_daily_mass_val_A 

. save "$IMPUTATION_DATA_OUT/StackDayPMMassRuleA.dta", replace
(file 02DataPipeline/emissions/imputation/StackDayPMMassRuleA.dta not found)
file 02DataPipeline/emissions/imputation/StackDayPMMassRuleA.dta saved

. restore

. *pause
. 
. /*******************************************************************************
>            NOW READY TO MAKE THE DEPENDENT VARIABLE FOR REGRESSIONS IN PART 6 
>            (6. TREATMENT EFFECT ANALYSIS). THIS VAR IS PLANT MONTH MASS (KG).
> 
>            STEPS TO CREATE THIS VARIABLE WILL BE:
> 
>            6.1) CALCULATE STACK WEEK MASS (KG), AND THEN PLANT WEEK MASS (KG).
>            FIRST GENERATE THESE VARIABLES IN THE STACK-DAY LEVEL DATA SET.
>            AND SAVE IT FOR FUTURE USE IF NEEDED ("_StackDayLevel.dta").
> 
>            6.2) THEN, COLLAPSE THE STACK-DAY LEVEL DATA SET TO KEEP ONE DATA POINT 
>            PER PLANT PER WEEK ("_PlantWeekLevel.dta"). 
> 
>            CONTAINS THE DEPENDENT VARIABLE: PLANT-WEEK MASS (KG) EMISSIONS 
>            USING IMPUTATION RULE 0.
>    ****************************************************************************/
. 
. preserve

. 
. ********************************************************************************
. ********************* [6.1] GENERATE STACK-MONTH MASS (KG) *********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER STACK
.         bysort composite_id month16: egen stack_month_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id month16: egen miss_stack_month_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_month_mass_val_rule`i' = . if miss_stack_month_mass_val == 1
  5.         la var stack_month_mass_val_rule`i' ///
>                 "Stack-month Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_stack_month_mass_val
  7. 
. }
(67,807 real changes made, 67,807 to missing)
(67,443 real changes made, 67,443 to missing)
(116,971 real changes made, 116,971 to missing)
(116,698 real changes made, 116,698 to missing)
(139,989 real changes made, 139,989 to missing)
(139,836 real changes made, 139,836 to missing)
(127,735 real changes made, 127,735 to missing)
(127,462 real changes made, 127,462 to missing)
(93,582 real changes made, 93,582 to missing)
(93,249 real changes made, 93,249 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id month16: gen dump=_n

. bysort composite_id month16: keep if _n==_N     
(215,450 observations deleted)

. keep composite_id industry_id gpcb_id month16 treatmentstatus stack_month_mass_val* 

. ** 7,440 observations. 310 stacks. 24 months from April 2019 to March 2021.
. 
. ********************************************************************************
. ******************** [6.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. /**     AS PER NICK'S INSTRUCTION ON WEEKLY CALL 01 DEC 2020: FOR PLANTS WITH >1 STACK, 
>            WE WILL ONLY CALCULATE THEIR PLANT MASS (KG) SUM IF ALL STACKS ARE CONNECTED. 
>            IF STACKS ARE PARTIALLY CONNECTED (i.e., ONLY 1 OF 3 STACKS CONNECTED), 
>    THE ENTIRE PLANT SUM WILL BE MISSING.        **/
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER PLANT
.         bysort gpcb_id month16: egen ind_month_mass_val_rule`i' = sum(stack_month_mass_val_rule`i')
  3.         bysort gpcb_id month16: egen miss_ind_month_mass_val = max(missing(stack_month_mass_val_rule`i'))
  4.         replace ind_month_mass_val_rule`i' = . if miss_ind_month_mass_val == 1
  5.         la var stack_month_mass_val_rule`i' ///
>                 "Plant-month Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_month_mass_val
  7. 
. }
(2,266 real changes made, 2,266 to missing)
(2,253 real changes made, 2,253 to missing)
(3,906 real changes made, 3,906 to missing)
(3,896 real changes made, 3,896 to missing)
(4,677 real changes made, 4,677 to missing)
(4,672 real changes made, 4,672 to missing)
(4,262 real changes made, 4,262 to missing)
(4,253 real changes made, 4,253 to missing)
(3,124 real changes made, 3,124 to missing)
(3,112 real changes made, 3,112 to missing)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id month16: gen dump=_n

. bysort gpcb_id month16: keep if _n==_N
(432 observations deleted)

. keep industry_id gpcb_id month16 treatmentstatus ind_month_mass_val* 

. ** 7,008 observations. 292 plants. 24 months from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/PlantMonthPMMassRuleA.dta", replace
(file 02DataPipeline/emissions/imputation/PlantMonthPMMassRuleA.dta not found)
file 02DataPipeline/emissions/imputation/PlantMonthPMMassRuleA.dta saved

. 
. restore

. 
. /*******************************************************************************
>            NOW WE MAKE THE DEPENDENT VARIABLE FOR PLOTTING TIME SERIES 
>            THIS VAR IS PLANT WEEK MASS (KG).
>    ****************************************************************************/
. 
. preserve

. 
. ********************************************************************************
. ********************* [7.1] GENERATE STACK-WEEK MASS (KG) **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate WEEKLY validated emissions PER STACK
.         bysort composite_id week: egen stack_week_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id week: egen miss_stack_week_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_week_mass_val_rule`i' = . if miss_stack_week_mass_val == 1
  5.         la var stack_week_mass_val_rule`i' ///
>                 "Stack-week Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_stack_week_mass_val
  7. 
. }
(52,533 real changes made, 52,533 to missing)
(52,344 real changes made, 52,344 to missing)
(106,117 real changes made, 106,117 to missing)
(105,991 real changes made, 105,991 to missing)
(131,012 real changes made, 131,012 to missing)
(130,963 real changes made, 130,963 to missing)
(117,883 real changes made, 117,883 to missing)
(117,778 real changes made, 117,778 to missing)
(80,630 real changes made, 80,630 to missing)
(80,469 real changes made, 80,469 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id week: gen dump=_n

. bysort composite_id week: keep if _n==_N        
(190,960 observations deleted)

. keep composite_id industry_id gpcb_id week treatmentstatus stack_week_mass_val*

. ** 31,930 Observations. 310 Stacks. 103 weeks from April 2019 to March 2021.
. 
. ********************************************************************************
. ******************** [7.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate WEEKLY validated emissions PER PLANT
.         bysort gpcb_id week: egen ind_week_mass_val_rule`i' = sum(stack_week_mass_val_rule`i')
  3.         bysort gpcb_id week: egen miss_ind_week_mass_val = max(missing(stack_week_mass_val_rule`i'))
  4.         replace ind_week_mass_val_rule`i' = . if miss_ind_week_mass_val == 1
  5.         la var stack_week_mass_val_rule`i' ///
>                 "Plant-week Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_week_mass_val
  7. 
. }
(7,683 real changes made, 7,683 to missing)
(7,654 real changes made, 7,654 to missing)
(15,288 real changes made, 15,288 to missing)
(15,269 real changes made, 15,269 to missing)
(18,859 real changes made, 18,859 to missing)
(18,852 real changes made, 18,852 to missing)
(16,958 real changes made, 16,958 to missing)
(16,943 real changes made, 16,943 to missing)
(11,661 real changes made, 11,661 to missing)
(11,636 real changes made, 11,636 to missing)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id week: gen dump=_n

. bysort gpcb_id week: keep if _n==_N
(1,854 observations deleted)

. keep industry_id gpcb_id week treatmentstatus ind_week_mass_val* 

. ** 30,076 Observations. 292 Plants. 103 weeks from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/PlantWeekPMMassRuleA.dta", replace
(file 02DataPipeline/emissions/imputation/PlantWeekPMMassRuleA.dta not found)
file 02DataPipeline/emissions/imputation/PlantWeekPMMassRuleA.dta saved

. 
. restore

. 
end of do-file

. do "$CODE_DIR/imputation/3b. Create PM Mass (Stack-Experiment, Plant-Period).do"

. /*******************************************************************************
>            Author:      Dipika Gawande
>            Project: ETS
>            Purpose: Create the dependent variable for regression, PLANT-MONTH KG 
>            EMISSIONS (KG/MONTH), using IMPUTATION RULE A: WITHIN-STACK 
>            MEAN MONTH KG/HR.
> 
>            Note: IMPUTATION RULE A is executed as follows:
> 
>            1) Missing values of Stack day kg/hr are imputed with the stack's 
>            own week mean kg/hr.
> 
>            2) If no week mean kg/hr (i.e., stack is missing entire week 
>            of stack-day observations, or is not CEMS-connected), all remaining 
>            missing values of Stack day kg/hr are imputed with the stack's own 
>            month mean kg/hr
> 
>            Date created: 15 September 2020
>            Version: STATA 15 MP
> 
>            Last edited: 13 January 2022
>            Edited by: Jeanne, Vineet, Kaixin
>    ****************************************************************************/
. 
. set more off

. clear all

. pause on

. 
. *-------------------------------------------------------------------------------
. 
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. drop if date < date("2019jan16", "YMD")
(0 observations deleted)

. format date %tddd-Mon-YY

. sort date composite_id

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        337        0.14        0.14
  17-Apr-19 |        337        0.14        0.28
  18-Apr-19 |        337        0.14        0.42
  19-Apr-19 |        337        0.14        0.56
  20-Apr-19 |        337        0.14        0.70
  21-Apr-19 |        337        0.14        0.83
  22-Apr-19 |        337        0.14        0.97
  23-Apr-19 |        337        0.14        1.11
  24-Apr-19 |        337        0.14        1.25
  25-Apr-19 |        337        0.14        1.39
  26-Apr-19 |        337        0.14        1.53
  27-Apr-19 |        337        0.14        1.67
  28-Apr-19 |        337        0.14        1.81
  29-Apr-19 |        337        0.14        1.95
  30-Apr-19 |        337        0.14        2.09
   1-May-19 |        337        0.14        2.23
   2-May-19 |        337        0.14        2.36
   3-May-19 |        337        0.14        2.50
   4-May-19 |        337        0.14        2.64
   5-May-19 |        337        0.14        2.78
   6-May-19 |        337        0.14        2.92
   7-May-19 |        337        0.14        3.06
   8-May-19 |        337        0.14        3.20
   9-May-19 |        337        0.14        3.34
  10-May-19 |        337        0.14        3.48
  11-May-19 |        337        0.14        3.62
  12-May-19 |        337        0.14        3.76
  13-May-19 |        337        0.14        3.89
  14-May-19 |        337        0.14        4.03
  15-May-19 |        337        0.14        4.17
  16-May-19 |        337        0.14        4.31
  17-May-19 |        337        0.14        4.45
  18-May-19 |        337        0.14        4.59
  19-May-19 |        337        0.14        4.73
  20-May-19 |        337        0.14        4.87
  21-May-19 |        337        0.14        5.01
  22-May-19 |        337        0.14        5.15
  23-May-19 |        337        0.14        5.29
  24-May-19 |        337        0.14        5.42
  25-May-19 |        337        0.14        5.56
  26-May-19 |        337        0.14        5.70
  27-May-19 |        337        0.14        5.84
  28-May-19 |        337        0.14        5.98
  29-May-19 |        337        0.14        6.12
  30-May-19 |        337        0.14        6.26
  31-May-19 |        337        0.14        6.40
   1-Jun-19 |        337        0.14        6.54
   2-Jun-19 |        337        0.14        6.68
   3-Jun-19 |        337        0.14        6.82
   4-Jun-19 |        337        0.14        6.95
   5-Jun-19 |        337        0.14        7.09
   6-Jun-19 |        337        0.14        7.23
   7-Jun-19 |        337        0.14        7.37
   8-Jun-19 |        337        0.14        7.51
   9-Jun-19 |        337        0.14        7.65
  10-Jun-19 |        337        0.14        7.79
  11-Jun-19 |        337        0.14        7.93
  12-Jun-19 |        337        0.14        8.07
  13-Jun-19 |        337        0.14        8.21
  14-Jun-19 |        337        0.14        8.34
  15-Jun-19 |        337        0.14        8.48
  16-Jun-19 |        337        0.14        8.62
  17-Jun-19 |        337        0.14        8.76
  18-Jun-19 |        337        0.14        8.90
  19-Jun-19 |        337        0.14        9.04
  20-Jun-19 |        337        0.14        9.18
  21-Jun-19 |        337        0.14        9.32
  22-Jun-19 |        337        0.14        9.46
  23-Jun-19 |        337        0.14        9.60
  24-Jun-19 |        337        0.14        9.74
  25-Jun-19 |        337        0.14        9.87
  26-Jun-19 |        337        0.14       10.01
  27-Jun-19 |        337        0.14       10.15
  28-Jun-19 |        337        0.14       10.29
  29-Jun-19 |        337        0.14       10.43
  30-Jun-19 |        337        0.14       10.57
   1-Jul-19 |        337        0.14       10.71
   2-Jul-19 |        337        0.14       10.85
   3-Jul-19 |        337        0.14       10.99
   4-Jul-19 |        337        0.14       11.13
   5-Jul-19 |        337        0.14       11.27
   6-Jul-19 |        337        0.14       11.40
   7-Jul-19 |        337        0.14       11.54
   8-Jul-19 |        337        0.14       11.68
   9-Jul-19 |        337        0.14       11.82
  10-Jul-19 |        337        0.14       11.96
  11-Jul-19 |        337        0.14       12.10
  12-Jul-19 |        337        0.14       12.24
  13-Jul-19 |        337        0.14       12.38
  14-Jul-19 |        337        0.14       12.52
  15-Jul-19 |        337        0.14       12.66
  16-Jul-19 |        337        0.14       12.80
  17-Jul-19 |        337        0.14       12.93
  18-Jul-19 |        337        0.14       13.07
  19-Jul-19 |        337        0.14       13.21
  20-Jul-19 |        337        0.14       13.35
  21-Jul-19 |        337        0.14       13.49
  22-Jul-19 |        337        0.14       13.63
  23-Jul-19 |        337        0.14       13.77
  24-Jul-19 |        337        0.14       13.91
  25-Jul-19 |        337        0.14       14.05
  26-Jul-19 |        337        0.14       14.19
  27-Jul-19 |        337        0.14       14.33
  28-Jul-19 |        337        0.14       14.46
  29-Jul-19 |        337        0.14       14.60
  30-Jul-19 |        337        0.14       14.74
  31-Jul-19 |        337        0.14       14.88
   1-Aug-19 |        337        0.14       15.02
   2-Aug-19 |        337        0.14       15.16
   3-Aug-19 |        337        0.14       15.30
   4-Aug-19 |        337        0.14       15.44
   5-Aug-19 |        337        0.14       15.58
   6-Aug-19 |        337        0.14       15.72
   7-Aug-19 |        337        0.14       15.86
   8-Aug-19 |        337        0.14       15.99
   9-Aug-19 |        337        0.14       16.13
  10-Aug-19 |        337        0.14       16.27
  11-Aug-19 |        337        0.14       16.41
  12-Aug-19 |        337        0.14       16.55
  13-Aug-19 |        337        0.14       16.69
  14-Aug-19 |        337        0.14       16.83
  15-Aug-19 |        337        0.14       16.97
  16-Aug-19 |        337        0.14       17.11
  17-Aug-19 |        337        0.14       17.25
  18-Aug-19 |        337        0.14       17.39
  19-Aug-19 |        337        0.14       17.52
  20-Aug-19 |        337        0.14       17.66
  21-Aug-19 |        337        0.14       17.80
  22-Aug-19 |        337        0.14       17.94
  23-Aug-19 |        337        0.14       18.08
  24-Aug-19 |        337        0.14       18.22
  25-Aug-19 |        337        0.14       18.36
  26-Aug-19 |        337        0.14       18.50
  27-Aug-19 |        337        0.14       18.64
  28-Aug-19 |        337        0.14       18.78
  29-Aug-19 |        337        0.14       18.92
  30-Aug-19 |        337        0.14       19.05
  31-Aug-19 |        337        0.14       19.19
   1-Sep-19 |        337        0.14       19.33
   2-Sep-19 |        337        0.14       19.47
   3-Sep-19 |        337        0.14       19.61
   4-Sep-19 |        337        0.14       19.75
   5-Sep-19 |        337        0.14       19.89
   6-Sep-19 |        337        0.14       20.03
   7-Sep-19 |        337        0.14       20.17
   8-Sep-19 |        337        0.14       20.31
   9-Sep-19 |        337        0.14       20.45
  10-Sep-19 |        337        0.14       20.58
  11-Sep-19 |        337        0.14       20.72
  12-Sep-19 |        337        0.14       20.86
  13-Sep-19 |        337        0.14       21.00
  14-Sep-19 |        337        0.14       21.14
  15-Sep-19 |        337        0.14       21.28
  16-Sep-19 |        337        0.14       21.42
  17-Sep-19 |        337        0.14       21.56
  18-Sep-19 |        337        0.14       21.70
  19-Sep-19 |        337        0.14       21.84
  20-Sep-19 |        337        0.14       21.97
  21-Sep-19 |        337        0.14       22.11
  22-Sep-19 |        337        0.14       22.25
  23-Sep-19 |        337        0.14       22.39
  24-Sep-19 |        337        0.14       22.53
  25-Sep-19 |        337        0.14       22.67
  26-Sep-19 |        337        0.14       22.81
  27-Sep-19 |        337        0.14       22.95
  28-Sep-19 |        337        0.14       23.09
  29-Sep-19 |        337        0.14       23.23
  30-Sep-19 |        337        0.14       23.37
   1-Oct-19 |        337        0.14       23.50
   2-Oct-19 |        337        0.14       23.64
   3-Oct-19 |        337        0.14       23.78
   4-Oct-19 |        337        0.14       23.92
   5-Oct-19 |        337        0.14       24.06
   6-Oct-19 |        337        0.14       24.20
   7-Oct-19 |        337        0.14       24.34
   8-Oct-19 |        337        0.14       24.48
   9-Oct-19 |        337        0.14       24.62
  10-Oct-19 |        337        0.14       24.76
  11-Oct-19 |        337        0.14       24.90
  12-Oct-19 |        337        0.14       25.03
  13-Oct-19 |        337        0.14       25.17
  14-Oct-19 |        337        0.14       25.31
  15-Oct-19 |        337        0.14       25.45
  16-Oct-19 |        337        0.14       25.59
  17-Oct-19 |        337        0.14       25.73
  18-Oct-19 |        337        0.14       25.87
  19-Oct-19 |        337        0.14       26.01
  20-Oct-19 |        337        0.14       26.15
  21-Oct-19 |        337        0.14       26.29
  22-Oct-19 |        337        0.14       26.43
  23-Oct-19 |        337        0.14       26.56
  24-Oct-19 |        337        0.14       26.70
  25-Oct-19 |        337        0.14       26.84
  26-Oct-19 |        337        0.14       26.98
  27-Oct-19 |        337        0.14       27.12
  28-Oct-19 |        337        0.14       27.26
  29-Oct-19 |        337        0.14       27.40
  30-Oct-19 |        337        0.14       27.54
  31-Oct-19 |        337        0.14       27.68
   1-Nov-19 |        337        0.14       27.82
   2-Nov-19 |        337        0.14       27.96
   3-Nov-19 |        337        0.14       28.09
   4-Nov-19 |        337        0.14       28.23
   5-Nov-19 |        337        0.14       28.37
   6-Nov-19 |        337        0.14       28.51
   7-Nov-19 |        337        0.14       28.65
   8-Nov-19 |        337        0.14       28.79
   9-Nov-19 |        337        0.14       28.93
  10-Nov-19 |        337        0.14       29.07
  11-Nov-19 |        337        0.14       29.21
  12-Nov-19 |        337        0.14       29.35
  13-Nov-19 |        337        0.14       29.49
  14-Nov-19 |        337        0.14       29.62
  15-Nov-19 |        337        0.14       29.76
  16-Nov-19 |        337        0.14       29.90
  17-Nov-19 |        337        0.14       30.04
  18-Nov-19 |        337        0.14       30.18
  19-Nov-19 |        337        0.14       30.32
  20-Nov-19 |        337        0.14       30.46
  21-Nov-19 |        337        0.14       30.60
  22-Nov-19 |        337        0.14       30.74
  23-Nov-19 |        337        0.14       30.88
  24-Nov-19 |        337        0.14       31.02
  25-Nov-19 |        337        0.14       31.15
  26-Nov-19 |        337        0.14       31.29
  27-Nov-19 |        337        0.14       31.43
  28-Nov-19 |        337        0.14       31.57
  29-Nov-19 |        337        0.14       31.71
  30-Nov-19 |        337        0.14       31.85
   1-Dec-19 |        337        0.14       31.99
   2-Dec-19 |        337        0.14       32.13
   3-Dec-19 |        337        0.14       32.27
   4-Dec-19 |        337        0.14       32.41
   5-Dec-19 |        337        0.14       32.55
   6-Dec-19 |        337        0.14       32.68
   7-Dec-19 |        337        0.14       32.82
   8-Dec-19 |        337        0.14       32.96
   9-Dec-19 |        337        0.14       33.10
  10-Dec-19 |        337        0.14       33.24
  11-Dec-19 |        337        0.14       33.38
  12-Dec-19 |        337        0.14       33.52
  13-Dec-19 |        337        0.14       33.66
  14-Dec-19 |        337        0.14       33.80
  15-Dec-19 |        337        0.14       33.94
  16-Dec-19 |        337        0.14       34.08
  17-Dec-19 |        337        0.14       34.21
  18-Dec-19 |        337        0.14       34.35
  19-Dec-19 |        337        0.14       34.49
  20-Dec-19 |        337        0.14       34.63
  21-Dec-19 |        337        0.14       34.77
  22-Dec-19 |        337        0.14       34.91
  23-Dec-19 |        337        0.14       35.05
  24-Dec-19 |        337        0.14       35.19
  25-Dec-19 |        337        0.14       35.33
  26-Dec-19 |        337        0.14       35.47
  27-Dec-19 |        337        0.14       35.61
  28-Dec-19 |        337        0.14       35.74
  29-Dec-19 |        337        0.14       35.88
  30-Dec-19 |        337        0.14       36.02
  31-Dec-19 |        337        0.14       36.16
   1-Jan-20 |        337        0.14       36.30
   2-Jan-20 |        337        0.14       36.44
   3-Jan-20 |        337        0.14       36.58
   4-Jan-20 |        337        0.14       36.72
   5-Jan-20 |        337        0.14       36.86
   6-Jan-20 |        337        0.14       37.00
   7-Jan-20 |        337        0.14       37.13
   8-Jan-20 |        337        0.14       37.27
   9-Jan-20 |        337        0.14       37.41
  10-Jan-20 |        337        0.14       37.55
  11-Jan-20 |        337        0.14       37.69
  12-Jan-20 |        337        0.14       37.83
  13-Jan-20 |        337        0.14       37.97
  14-Jan-20 |        337        0.14       38.11
  15-Jan-20 |        337        0.14       38.25
  16-Jan-20 |        337        0.14       38.39
  17-Jan-20 |        337        0.14       38.53
  18-Jan-20 |        337        0.14       38.66
  19-Jan-20 |        337        0.14       38.80
  20-Jan-20 |        337        0.14       38.94
  21-Jan-20 |        337        0.14       39.08
  22-Jan-20 |        337        0.14       39.22
  23-Jan-20 |        337        0.14       39.36
  24-Jan-20 |        337        0.14       39.50
  25-Jan-20 |        337        0.14       39.64
  26-Jan-20 |        337        0.14       39.78
  27-Jan-20 |        337        0.14       39.92
  28-Jan-20 |        337        0.14       40.06
  29-Jan-20 |        337        0.14       40.19
  30-Jan-20 |        337        0.14       40.33
  31-Jan-20 |        337        0.14       40.47
   1-Feb-20 |        337        0.14       40.61
   2-Feb-20 |        337        0.14       40.75
   3-Feb-20 |        337        0.14       40.89
   4-Feb-20 |        337        0.14       41.03
   5-Feb-20 |        337        0.14       41.17
   6-Feb-20 |        337        0.14       41.31
   7-Feb-20 |        337        0.14       41.45
   8-Feb-20 |        337        0.14       41.59
   9-Feb-20 |        337        0.14       41.72
  10-Feb-20 |        337        0.14       41.86
  11-Feb-20 |        337        0.14       42.00
  12-Feb-20 |        337        0.14       42.14
  13-Feb-20 |        337        0.14       42.28
  14-Feb-20 |        337        0.14       42.42
  15-Feb-20 |        337        0.14       42.56
  16-Feb-20 |        337        0.14       42.70
  17-Feb-20 |        337        0.14       42.84
  18-Feb-20 |        337        0.14       42.98
  19-Feb-20 |        337        0.14       43.12
  20-Feb-20 |        337        0.14       43.25
  21-Feb-20 |        337        0.14       43.39
  22-Feb-20 |        337        0.14       43.53
  23-Feb-20 |        337        0.14       43.67
  24-Feb-20 |        337        0.14       43.81
  25-Feb-20 |        337        0.14       43.95
  26-Feb-20 |        337        0.14       44.09
  27-Feb-20 |        337        0.14       44.23
  28-Feb-20 |        337        0.14       44.37
  29-Feb-20 |        337        0.14       44.51
   1-Mar-20 |        337        0.14       44.65
   2-Mar-20 |        337        0.14       44.78
   3-Mar-20 |        337        0.14       44.92
   4-Mar-20 |        337        0.14       45.06
   5-Mar-20 |        337        0.14       45.20
   6-Mar-20 |        337        0.14       45.34
   7-Mar-20 |        337        0.14       45.48
   8-Mar-20 |        337        0.14       45.62
   9-Mar-20 |        337        0.14       45.76
  10-Mar-20 |        337        0.14       45.90
  11-Mar-20 |        337        0.14       46.04
  12-Mar-20 |        337        0.14       46.18
  13-Mar-20 |        337        0.14       46.31
  14-Mar-20 |        337        0.14       46.45
  15-Mar-20 |        337        0.14       46.59
  16-Mar-20 |        337        0.14       46.73
  17-Mar-20 |        337        0.14       46.87
  18-Mar-20 |        337        0.14       47.01
  19-Mar-20 |        337        0.14       47.15
  20-Mar-20 |        337        0.14       47.29
  21-Mar-20 |        337        0.14       47.43
  22-Mar-20 |        337        0.14       47.57
  23-Mar-20 |        337        0.14       47.71
  24-Mar-20 |        337        0.14       47.84
  25-Mar-20 |        337        0.14       47.98
  26-Mar-20 |        337        0.14       48.12
  27-Mar-20 |        337        0.14       48.26
  28-Mar-20 |        337        0.14       48.40
  29-Mar-20 |        337        0.14       48.54
  30-Mar-20 |        337        0.14       48.68
  31-Mar-20 |        337        0.14       48.82
   1-Apr-20 |        337        0.14       48.96
   2-Apr-20 |        337        0.14       49.10
   3-Apr-20 |        337        0.14       49.24
   4-Apr-20 |        337        0.14       49.37
   5-Apr-20 |        337        0.14       49.51
   6-Apr-20 |        337        0.14       49.65
   7-Apr-20 |        337        0.14       49.79
   8-Apr-20 |        337        0.14       49.93
   9-Apr-20 |        337        0.14       50.07
  10-Apr-20 |        337        0.14       50.21
  11-Apr-20 |        337        0.14       50.35
  12-Apr-20 |        337        0.14       50.49
  13-Apr-20 |        337        0.14       50.63
  14-Apr-20 |        337        0.14       50.76
  15-Apr-20 |        337        0.14       50.90
  16-Apr-20 |        337        0.14       51.04
  17-Apr-20 |        337        0.14       51.18
  18-Apr-20 |        337        0.14       51.32
  19-Apr-20 |        337        0.14       51.46
  20-Apr-20 |        337        0.14       51.60
  21-Apr-20 |        337        0.14       51.74
  22-Apr-20 |        337        0.14       51.88
  23-Apr-20 |        337        0.14       52.02
  24-Apr-20 |        337        0.14       52.16
  25-Apr-20 |        337        0.14       52.29
  26-Apr-20 |        337        0.14       52.43
  27-Apr-20 |        337        0.14       52.57
  28-Apr-20 |        337        0.14       52.71
  29-Apr-20 |        337        0.14       52.85
  30-Apr-20 |        337        0.14       52.99
   1-May-20 |        337        0.14       53.13
   2-May-20 |        337        0.14       53.27
   3-May-20 |        337        0.14       53.41
   4-May-20 |        337        0.14       53.55
   5-May-20 |        337        0.14       53.69
   6-May-20 |        337        0.14       53.82
   7-May-20 |        337        0.14       53.96
   8-May-20 |        337        0.14       54.10
   9-May-20 |        337        0.14       54.24
  10-May-20 |        337        0.14       54.38
  11-May-20 |        337        0.14       54.52
  12-May-20 |        337        0.14       54.66
  13-May-20 |        337        0.14       54.80
  14-May-20 |        337        0.14       54.94
  15-May-20 |        337        0.14       55.08
  16-May-20 |        337        0.14       55.22
  17-May-20 |        337        0.14       55.35
  18-May-20 |        337        0.14       55.49
  19-May-20 |        337        0.14       55.63
  20-May-20 |        337        0.14       55.77
  21-May-20 |        337        0.14       55.91
  22-May-20 |        337        0.14       56.05
  23-May-20 |        337        0.14       56.19
  24-May-20 |        337        0.14       56.33
  25-May-20 |        337        0.14       56.47
  26-May-20 |        337        0.14       56.61
  27-May-20 |        337        0.14       56.75
  28-May-20 |        337        0.14       56.88
  29-May-20 |        337        0.14       57.02
  30-May-20 |        337        0.14       57.16
  31-May-20 |        337        0.14       57.30
   1-Jun-20 |        337        0.14       57.44
   2-Jun-20 |        337        0.14       57.58
   3-Jun-20 |        337        0.14       57.72
   4-Jun-20 |        337        0.14       57.86
   5-Jun-20 |        337        0.14       58.00
   6-Jun-20 |        337        0.14       58.14
   7-Jun-20 |        337        0.14       58.28
   8-Jun-20 |        337        0.14       58.41
   9-Jun-20 |        337        0.14       58.55
  10-Jun-20 |        337        0.14       58.69
  11-Jun-20 |        337        0.14       58.83
  12-Jun-20 |        337        0.14       58.97
  13-Jun-20 |        337        0.14       59.11
  14-Jun-20 |        337        0.14       59.25
  15-Jun-20 |        337        0.14       59.39
  16-Jun-20 |        337        0.14       59.53
  17-Jun-20 |        337        0.14       59.67
  18-Jun-20 |        337        0.14       59.81
  19-Jun-20 |        337        0.14       59.94
  20-Jun-20 |        337        0.14       60.08
  21-Jun-20 |        337        0.14       60.22
  22-Jun-20 |        337        0.14       60.36
  23-Jun-20 |        337        0.14       60.50
  24-Jun-20 |        337        0.14       60.64
  25-Jun-20 |        337        0.14       60.78
  26-Jun-20 |        337        0.14       60.92
  27-Jun-20 |        337        0.14       61.06
  28-Jun-20 |        337        0.14       61.20
  29-Jun-20 |        337        0.14       61.34
  30-Jun-20 |        337        0.14       61.47
   1-Jul-20 |        337        0.14       61.61
   2-Jul-20 |        337        0.14       61.75
   3-Jul-20 |        337        0.14       61.89
   4-Jul-20 |        337        0.14       62.03
   5-Jul-20 |        337        0.14       62.17
   6-Jul-20 |        337        0.14       62.31
   7-Jul-20 |        337        0.14       62.45
   8-Jul-20 |        337        0.14       62.59
   9-Jul-20 |        337        0.14       62.73
  10-Jul-20 |        337        0.14       62.87
  11-Jul-20 |        337        0.14       63.00
  12-Jul-20 |        337        0.14       63.14
  13-Jul-20 |        337        0.14       63.28
  14-Jul-20 |        337        0.14       63.42
  15-Jul-20 |        337        0.14       63.56
  16-Jul-20 |        337        0.14       63.70
  17-Jul-20 |        337        0.14       63.84
  18-Jul-20 |        337        0.14       63.98
  19-Jul-20 |        337        0.14       64.12
  20-Jul-20 |        337        0.14       64.26
  21-Jul-20 |        337        0.14       64.39
  22-Jul-20 |        337        0.14       64.53
  23-Jul-20 |        337        0.14       64.67
  24-Jul-20 |        337        0.14       64.81
  25-Jul-20 |        337        0.14       64.95
  26-Jul-20 |        337        0.14       65.09
  27-Jul-20 |        337        0.14       65.23
  28-Jul-20 |        337        0.14       65.37
  29-Jul-20 |        337        0.14       65.51
  30-Jul-20 |        337        0.14       65.65
  31-Jul-20 |        337        0.14       65.79
   1-Aug-20 |        337        0.14       65.92
   2-Aug-20 |        337        0.14       66.06
   3-Aug-20 |        337        0.14       66.20
   4-Aug-20 |        337        0.14       66.34
   5-Aug-20 |        337        0.14       66.48
   6-Aug-20 |        337        0.14       66.62
   7-Aug-20 |        337        0.14       66.76
   8-Aug-20 |        337        0.14       66.90
   9-Aug-20 |        337        0.14       67.04
  10-Aug-20 |        337        0.14       67.18
  11-Aug-20 |        337        0.14       67.32
  12-Aug-20 |        337        0.14       67.45
  13-Aug-20 |        337        0.14       67.59
  14-Aug-20 |        337        0.14       67.73
  15-Aug-20 |        337        0.14       67.87
  16-Aug-20 |        337        0.14       68.01
  17-Aug-20 |        337        0.14       68.15
  18-Aug-20 |        337        0.14       68.29
  19-Aug-20 |        337        0.14       68.43
  20-Aug-20 |        337        0.14       68.57
  21-Aug-20 |        337        0.14       68.71
  22-Aug-20 |        337        0.14       68.85
  23-Aug-20 |        337        0.14       68.98
  24-Aug-20 |        337        0.14       69.12
  25-Aug-20 |        337        0.14       69.26
  26-Aug-20 |        337        0.14       69.40
  27-Aug-20 |        337        0.14       69.54
  28-Aug-20 |        337        0.14       69.68
  29-Aug-20 |        337        0.14       69.82
  30-Aug-20 |        337        0.14       69.96
  31-Aug-20 |        337        0.14       70.10
   1-Sep-20 |        337        0.14       70.24
   2-Sep-20 |        337        0.14       70.38
   3-Sep-20 |        337        0.14       70.51
   4-Sep-20 |        337        0.14       70.65
   5-Sep-20 |        337        0.14       70.79
   6-Sep-20 |        337        0.14       70.93
   7-Sep-20 |        337        0.14       71.07
   8-Sep-20 |        337        0.14       71.21
   9-Sep-20 |        337        0.14       71.35
  10-Sep-20 |        337        0.14       71.49
  11-Sep-20 |        337        0.14       71.63
  12-Sep-20 |        337        0.14       71.77
  13-Sep-20 |        337        0.14       71.91
  14-Sep-20 |        337        0.14       72.04
  15-Sep-20 |        337        0.14       72.18
  16-Sep-20 |        337        0.14       72.32
  17-Sep-20 |        337        0.14       72.46
  18-Sep-20 |        337        0.14       72.60
  19-Sep-20 |        337        0.14       72.74
  20-Sep-20 |        337        0.14       72.88
  21-Sep-20 |        337        0.14       73.02
  22-Sep-20 |        337        0.14       73.16
  23-Sep-20 |        337        0.14       73.30
  24-Sep-20 |        337        0.14       73.44
  25-Sep-20 |        337        0.14       73.57
  26-Sep-20 |        337        0.14       73.71
  27-Sep-20 |        337        0.14       73.85
  28-Sep-20 |        337        0.14       73.99
  29-Sep-20 |        337        0.14       74.13
  30-Sep-20 |        337        0.14       74.27
   1-Oct-20 |        337        0.14       74.41
   2-Oct-20 |        337        0.14       74.55
   3-Oct-20 |        337        0.14       74.69
   4-Oct-20 |        337        0.14       74.83
   5-Oct-20 |        337        0.14       74.97
   6-Oct-20 |        337        0.14       75.10
   7-Oct-20 |        337        0.14       75.24
   8-Oct-20 |        337        0.14       75.38
   9-Oct-20 |        337        0.14       75.52
  10-Oct-20 |        337        0.14       75.66
  11-Oct-20 |        337        0.14       75.80
  12-Oct-20 |        337        0.14       75.94
  13-Oct-20 |        337        0.14       76.08
  14-Oct-20 |        337        0.14       76.22
  15-Oct-20 |        337        0.14       76.36
  16-Oct-20 |        337        0.14       76.50
  17-Oct-20 |        337        0.14       76.63
  18-Oct-20 |        337        0.14       76.77
  19-Oct-20 |        337        0.14       76.91
  20-Oct-20 |        337        0.14       77.05
  21-Oct-20 |        337        0.14       77.19
  22-Oct-20 |        337        0.14       77.33
  23-Oct-20 |        337        0.14       77.47
  24-Oct-20 |        337        0.14       77.61
  25-Oct-20 |        337        0.14       77.75
  26-Oct-20 |        337        0.14       77.89
  27-Oct-20 |        337        0.14       78.03
  28-Oct-20 |        337        0.14       78.16
  29-Oct-20 |        337        0.14       78.30
  30-Oct-20 |        337        0.14       78.44
  31-Oct-20 |        337        0.14       78.58
   1-Nov-20 |        337        0.14       78.72
   2-Nov-20 |        337        0.14       78.86
   3-Nov-20 |        337        0.14       79.00
   4-Nov-20 |        337        0.14       79.14
   5-Nov-20 |        337        0.14       79.28
   6-Nov-20 |        337        0.14       79.42
   7-Nov-20 |        337        0.14       79.55
   8-Nov-20 |        337        0.14       79.69
   9-Nov-20 |        337        0.14       79.83
  10-Nov-20 |        337        0.14       79.97
  11-Nov-20 |        337        0.14       80.11
  12-Nov-20 |        337        0.14       80.25
  13-Nov-20 |        337        0.14       80.39
  14-Nov-20 |        337        0.14       80.53
  15-Nov-20 |        337        0.14       80.67
  16-Nov-20 |        337        0.14       80.81
  17-Nov-20 |        337        0.14       80.95
  18-Nov-20 |        337        0.14       81.08
  19-Nov-20 |        337        0.14       81.22
  20-Nov-20 |        337        0.14       81.36
  21-Nov-20 |        337        0.14       81.50
  22-Nov-20 |        337        0.14       81.64
  23-Nov-20 |        337        0.14       81.78
  24-Nov-20 |        337        0.14       81.92
  25-Nov-20 |        337        0.14       82.06
  26-Nov-20 |        337        0.14       82.20
  27-Nov-20 |        337        0.14       82.34
  28-Nov-20 |        337        0.14       82.48
  29-Nov-20 |        337        0.14       82.61
  30-Nov-20 |        337        0.14       82.75
   1-Dec-20 |        337        0.14       82.89
   2-Dec-20 |        337        0.14       83.03
   3-Dec-20 |        337        0.14       83.17
   4-Dec-20 |        337        0.14       83.31
   5-Dec-20 |        337        0.14       83.45
   6-Dec-20 |        337        0.14       83.59
   7-Dec-20 |        337        0.14       83.73
   8-Dec-20 |        337        0.14       83.87
   9-Dec-20 |        337        0.14       84.01
  10-Dec-20 |        337        0.14       84.14
  11-Dec-20 |        337        0.14       84.28
  12-Dec-20 |        337        0.14       84.42
  13-Dec-20 |        337        0.14       84.56
  14-Dec-20 |        337        0.14       84.70
  15-Dec-20 |        337        0.14       84.84
  16-Dec-20 |        337        0.14       84.98
  17-Dec-20 |        337        0.14       85.12
  18-Dec-20 |        337        0.14       85.26
  19-Dec-20 |        337        0.14       85.40
  20-Dec-20 |        337        0.14       85.54
  21-Dec-20 |        337        0.14       85.67
  22-Dec-20 |        337        0.14       85.81
  23-Dec-20 |        337        0.14       85.95
  24-Dec-20 |        337        0.14       86.09
  25-Dec-20 |        337        0.14       86.23
  26-Dec-20 |        337        0.14       86.37
  27-Dec-20 |        337        0.14       86.51
  28-Dec-20 |        337        0.14       86.65
  29-Dec-20 |        337        0.14       86.79
  30-Dec-20 |        337        0.14       86.93
  31-Dec-20 |        337        0.14       87.07
   1-Jan-21 |        337        0.14       87.20
   2-Jan-21 |        337        0.14       87.34
   3-Jan-21 |        337        0.14       87.48
   4-Jan-21 |        337        0.14       87.62
   5-Jan-21 |        337        0.14       87.76
   6-Jan-21 |        337        0.14       87.90
   7-Jan-21 |        337        0.14       88.04
   8-Jan-21 |        337        0.14       88.18
   9-Jan-21 |        337        0.14       88.32
  10-Jan-21 |        337        0.14       88.46
  11-Jan-21 |        337        0.14       88.60
  12-Jan-21 |        337        0.14       88.73
  13-Jan-21 |        337        0.14       88.87
  14-Jan-21 |        337        0.14       89.01
  15-Jan-21 |        337        0.14       89.15
  16-Jan-21 |        337        0.14       89.29
  17-Jan-21 |        337        0.14       89.43
  18-Jan-21 |        337        0.14       89.57
  19-Jan-21 |        337        0.14       89.71
  20-Jan-21 |        337        0.14       89.85
  21-Jan-21 |        337        0.14       89.99
  22-Jan-21 |        337        0.14       90.13
  23-Jan-21 |        337        0.14       90.26
  24-Jan-21 |        337        0.14       90.40
  25-Jan-21 |        337        0.14       90.54
  26-Jan-21 |        337        0.14       90.68
  27-Jan-21 |        337        0.14       90.82
  28-Jan-21 |        337        0.14       90.96
  29-Jan-21 |        337        0.14       91.10
  30-Jan-21 |        337        0.14       91.24
  31-Jan-21 |        337        0.14       91.38
   1-Feb-21 |        337        0.14       91.52
   2-Feb-21 |        337        0.14       91.66
   3-Feb-21 |        337        0.14       91.79
   4-Feb-21 |        337        0.14       91.93
   5-Feb-21 |        337        0.14       92.07
   6-Feb-21 |        337        0.14       92.21
   7-Feb-21 |        337        0.14       92.35
   8-Feb-21 |        337        0.14       92.49
   9-Feb-21 |        337        0.14       92.63
  10-Feb-21 |        337        0.14       92.77
  11-Feb-21 |        337        0.14       92.91
  12-Feb-21 |        337        0.14       93.05
  13-Feb-21 |        337        0.14       93.18
  14-Feb-21 |        337        0.14       93.32
  15-Feb-21 |        337        0.14       93.46
  16-Feb-21 |        337        0.14       93.60
  17-Feb-21 |        337        0.14       93.74
  18-Feb-21 |        337        0.14       93.88
  19-Feb-21 |        337        0.14       94.02
  20-Feb-21 |        337        0.14       94.16
  21-Feb-21 |        337        0.14       94.30
  22-Feb-21 |        337        0.14       94.44
  23-Feb-21 |        337        0.14       94.58
  24-Feb-21 |        337        0.14       94.71
  25-Feb-21 |        337        0.14       94.85
  26-Feb-21 |        337        0.14       94.99
  27-Feb-21 |        337        0.14       95.13
  28-Feb-21 |        337        0.14       95.27
   1-Mar-21 |        337        0.14       95.41
   2-Mar-21 |        337        0.14       95.55
   3-Mar-21 |        337        0.14       95.69
   4-Mar-21 |        337        0.14       95.83
   5-Mar-21 |        337        0.14       95.97
   6-Mar-21 |        337        0.14       96.11
   7-Mar-21 |        337        0.14       96.24
   8-Mar-21 |        337        0.14       96.38
   9-Mar-21 |        337        0.14       96.52
  10-Mar-21 |        337        0.14       96.66
  11-Mar-21 |        337        0.14       96.80
  12-Mar-21 |        337        0.14       96.94
  13-Mar-21 |        337        0.14       97.08
  14-Mar-21 |        337        0.14       97.22
  15-Mar-21 |        337        0.14       97.36
  16-Mar-21 |        337        0.14       97.50
  17-Mar-21 |        337        0.14       97.64
  18-Mar-21 |        337        0.14       97.77
  19-Mar-21 |        337        0.14       97.91
  20-Mar-21 |        337        0.14       98.05
  21-Mar-21 |        337        0.14       98.19
  22-Mar-21 |        337        0.14       98.33
  23-Mar-21 |        337        0.14       98.47
  24-Mar-21 |        337        0.14       98.61
  25-Mar-21 |        337        0.14       98.75
  26-Mar-21 |        337        0.14       98.89
  27-Mar-21 |        337        0.14       99.03
  28-Mar-21 |        337        0.14       99.17
  29-Mar-21 |        337        0.14       99.30
  30-Mar-21 |        337        0.14       99.44
  31-Mar-21 |        337        0.14       99.58
   1-Apr-21 |        337        0.14       99.72
   2-Apr-21 |        337        0.14       99.86
   3-Apr-21 |        337        0.14      100.00
------------+-----------------------------------
      Total |    242,303      100.00

. ** 242,303 Observations. 337 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ** Generate a week variable
. drop week

. gen int week = floor((date-td(31dec2018))/7)+1

. la var week "Week"

. 
. ** Generate a month variable which goes from the 16th of each month to the 15th of the next month. 
. ** This definition of month aligns with the implementation of ETS market in its initial Stages. 
. ** Nick Cox's code:
. drop month16

. gen month16 = date if day(date) == 16
(234,215 missing values generated)

. //      replace month16 = mdy(1, 16, 2019) in 1
. replace month16 = month16[_n-1] if missing(month16)
(234,215 real changes made)

. la var month16 "Month, defined as 16th of this month to 15th of next month"

. gen month16_sif = month16

. format month16 %tddd-Mon-YY

. la var month16_sif "[SIF] Month-year. For convenience."

. order month16_sif, a(month16)

. sort composite_id date

. ** Check days in each month for one device. Looks good.
. *tab month16 if composite_id == "GJSRT100740111"
. 
. ** Generate Dummy for Interregnum period of market
. ** Covid lockdown -- 23 March 2020 to 11 October 2021. 
. ** Mock-III started on 12 October 2021.
. gen D_interregnum_week = week >= 65 & week <= 93

. replace D_interregnum_week =1 if week == 99 | week == 100
(4,718 real changes made)

. la var D_interregnum_week ///
>         "[Week-level] =1 if Interregnum due to Covid-19 lockdown, zero otherwise."

. 
. drop extinct_with_assignment removed_from_sample comment

. 
. ** Remove plants that have no observation from 16-Apr-19 to 03-Apr-21.
. bysort gpcb_id: egen pct_report = mean(!missing(pm_mass_rule0)) if ///
>         month16 >= date("2019jul16", "YMD") & D_interregnum_week == 0
(103,796 missing values generated)

. sort composite_id date

. bysort gpcb_id: egen pct_report_1 = mean(pct_report)

. drop if pct_report_1 == 0
(19,413 observations deleted)

. drop pct_report pct_report_1

. sort composite_id date  

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        310        0.14        0.14
  17-Apr-19 |        310        0.14        0.28
  18-Apr-19 |        310        0.14        0.42
  19-Apr-19 |        310        0.14        0.56
  20-Apr-19 |        310        0.14        0.70
  21-Apr-19 |        310        0.14        0.83
  22-Apr-19 |        310        0.14        0.97
  23-Apr-19 |        310        0.14        1.11
  24-Apr-19 |        310        0.14        1.25
  25-Apr-19 |        310        0.14        1.39
  26-Apr-19 |        310        0.14        1.53
  27-Apr-19 |        310        0.14        1.67
  28-Apr-19 |        310        0.14        1.81
  29-Apr-19 |        310        0.14        1.95
  30-Apr-19 |        310        0.14        2.09
   1-May-19 |        310        0.14        2.23
   2-May-19 |        310        0.14        2.36
   3-May-19 |        310        0.14        2.50
   4-May-19 |        310        0.14        2.64
   5-May-19 |        310        0.14        2.78
   6-May-19 |        310        0.14        2.92
   7-May-19 |        310        0.14        3.06
   8-May-19 |        310        0.14        3.20
   9-May-19 |        310        0.14        3.34
  10-May-19 |        310        0.14        3.48
  11-May-19 |        310        0.14        3.62
  12-May-19 |        310        0.14        3.76
  13-May-19 |        310        0.14        3.89
  14-May-19 |        310        0.14        4.03
  15-May-19 |        310        0.14        4.17
  16-May-19 |        310        0.14        4.31
  17-May-19 |        310        0.14        4.45
  18-May-19 |        310        0.14        4.59
  19-May-19 |        310        0.14        4.73
  20-May-19 |        310        0.14        4.87
  21-May-19 |        310        0.14        5.01
  22-May-19 |        310        0.14        5.15
  23-May-19 |        310        0.14        5.29
  24-May-19 |        310        0.14        5.42
  25-May-19 |        310        0.14        5.56
  26-May-19 |        310        0.14        5.70
  27-May-19 |        310        0.14        5.84
  28-May-19 |        310        0.14        5.98
  29-May-19 |        310        0.14        6.12
  30-May-19 |        310        0.14        6.26
  31-May-19 |        310        0.14        6.40
   1-Jun-19 |        310        0.14        6.54
   2-Jun-19 |        310        0.14        6.68
   3-Jun-19 |        310        0.14        6.82
   4-Jun-19 |        310        0.14        6.95
   5-Jun-19 |        310        0.14        7.09
   6-Jun-19 |        310        0.14        7.23
   7-Jun-19 |        310        0.14        7.37
   8-Jun-19 |        310        0.14        7.51
   9-Jun-19 |        310        0.14        7.65
  10-Jun-19 |        310        0.14        7.79
  11-Jun-19 |        310        0.14        7.93
  12-Jun-19 |        310        0.14        8.07
  13-Jun-19 |        310        0.14        8.21
  14-Jun-19 |        310        0.14        8.34
  15-Jun-19 |        310        0.14        8.48
  16-Jun-19 |        310        0.14        8.62
  17-Jun-19 |        310        0.14        8.76
  18-Jun-19 |        310        0.14        8.90
  19-Jun-19 |        310        0.14        9.04
  20-Jun-19 |        310        0.14        9.18
  21-Jun-19 |        310        0.14        9.32
  22-Jun-19 |        310        0.14        9.46
  23-Jun-19 |        310        0.14        9.60
  24-Jun-19 |        310        0.14        9.74
  25-Jun-19 |        310        0.14        9.87
  26-Jun-19 |        310        0.14       10.01
  27-Jun-19 |        310        0.14       10.15
  28-Jun-19 |        310        0.14       10.29
  29-Jun-19 |        310        0.14       10.43
  30-Jun-19 |        310        0.14       10.57
   1-Jul-19 |        310        0.14       10.71
   2-Jul-19 |        310        0.14       10.85
   3-Jul-19 |        310        0.14       10.99
   4-Jul-19 |        310        0.14       11.13
   5-Jul-19 |        310        0.14       11.27
   6-Jul-19 |        310        0.14       11.40
   7-Jul-19 |        310        0.14       11.54
   8-Jul-19 |        310        0.14       11.68
   9-Jul-19 |        310        0.14       11.82
  10-Jul-19 |        310        0.14       11.96
  11-Jul-19 |        310        0.14       12.10
  12-Jul-19 |        310        0.14       12.24
  13-Jul-19 |        310        0.14       12.38
  14-Jul-19 |        310        0.14       12.52
  15-Jul-19 |        310        0.14       12.66
  16-Jul-19 |        310        0.14       12.80
  17-Jul-19 |        310        0.14       12.93
  18-Jul-19 |        310        0.14       13.07
  19-Jul-19 |        310        0.14       13.21
  20-Jul-19 |        310        0.14       13.35
  21-Jul-19 |        310        0.14       13.49
  22-Jul-19 |        310        0.14       13.63
  23-Jul-19 |        310        0.14       13.77
  24-Jul-19 |        310        0.14       13.91
  25-Jul-19 |        310        0.14       14.05
  26-Jul-19 |        310        0.14       14.19
  27-Jul-19 |        310        0.14       14.33
  28-Jul-19 |        310        0.14       14.46
  29-Jul-19 |        310        0.14       14.60
  30-Jul-19 |        310        0.14       14.74
  31-Jul-19 |        310        0.14       14.88
   1-Aug-19 |        310        0.14       15.02
   2-Aug-19 |        310        0.14       15.16
   3-Aug-19 |        310        0.14       15.30
   4-Aug-19 |        310        0.14       15.44
   5-Aug-19 |        310        0.14       15.58
   6-Aug-19 |        310        0.14       15.72
   7-Aug-19 |        310        0.14       15.86
   8-Aug-19 |        310        0.14       15.99
   9-Aug-19 |        310        0.14       16.13
  10-Aug-19 |        310        0.14       16.27
  11-Aug-19 |        310        0.14       16.41
  12-Aug-19 |        310        0.14       16.55
  13-Aug-19 |        310        0.14       16.69
  14-Aug-19 |        310        0.14       16.83
  15-Aug-19 |        310        0.14       16.97
  16-Aug-19 |        310        0.14       17.11
  17-Aug-19 |        310        0.14       17.25
  18-Aug-19 |        310        0.14       17.39
  19-Aug-19 |        310        0.14       17.52
  20-Aug-19 |        310        0.14       17.66
  21-Aug-19 |        310        0.14       17.80
  22-Aug-19 |        310        0.14       17.94
  23-Aug-19 |        310        0.14       18.08
  24-Aug-19 |        310        0.14       18.22
  25-Aug-19 |        310        0.14       18.36
  26-Aug-19 |        310        0.14       18.50
  27-Aug-19 |        310        0.14       18.64
  28-Aug-19 |        310        0.14       18.78
  29-Aug-19 |        310        0.14       18.92
  30-Aug-19 |        310        0.14       19.05
  31-Aug-19 |        310        0.14       19.19
   1-Sep-19 |        310        0.14       19.33
   2-Sep-19 |        310        0.14       19.47
   3-Sep-19 |        310        0.14       19.61
   4-Sep-19 |        310        0.14       19.75
   5-Sep-19 |        310        0.14       19.89
   6-Sep-19 |        310        0.14       20.03
   7-Sep-19 |        310        0.14       20.17
   8-Sep-19 |        310        0.14       20.31
   9-Sep-19 |        310        0.14       20.45
  10-Sep-19 |        310        0.14       20.58
  11-Sep-19 |        310        0.14       20.72
  12-Sep-19 |        310        0.14       20.86
  13-Sep-19 |        310        0.14       21.00
  14-Sep-19 |        310        0.14       21.14
  15-Sep-19 |        310        0.14       21.28
  16-Sep-19 |        310        0.14       21.42
  17-Sep-19 |        310        0.14       21.56
  18-Sep-19 |        310        0.14       21.70
  19-Sep-19 |        310        0.14       21.84
  20-Sep-19 |        310        0.14       21.97
  21-Sep-19 |        310        0.14       22.11
  22-Sep-19 |        310        0.14       22.25
  23-Sep-19 |        310        0.14       22.39
  24-Sep-19 |        310        0.14       22.53
  25-Sep-19 |        310        0.14       22.67
  26-Sep-19 |        310        0.14       22.81
  27-Sep-19 |        310        0.14       22.95
  28-Sep-19 |        310        0.14       23.09
  29-Sep-19 |        310        0.14       23.23
  30-Sep-19 |        310        0.14       23.37
   1-Oct-19 |        310        0.14       23.50
   2-Oct-19 |        310        0.14       23.64
   3-Oct-19 |        310        0.14       23.78
   4-Oct-19 |        310        0.14       23.92
   5-Oct-19 |        310        0.14       24.06
   6-Oct-19 |        310        0.14       24.20
   7-Oct-19 |        310        0.14       24.34
   8-Oct-19 |        310        0.14       24.48
   9-Oct-19 |        310        0.14       24.62
  10-Oct-19 |        310        0.14       24.76
  11-Oct-19 |        310        0.14       24.90
  12-Oct-19 |        310        0.14       25.03
  13-Oct-19 |        310        0.14       25.17
  14-Oct-19 |        310        0.14       25.31
  15-Oct-19 |        310        0.14       25.45
  16-Oct-19 |        310        0.14       25.59
  17-Oct-19 |        310        0.14       25.73
  18-Oct-19 |        310        0.14       25.87
  19-Oct-19 |        310        0.14       26.01
  20-Oct-19 |        310        0.14       26.15
  21-Oct-19 |        310        0.14       26.29
  22-Oct-19 |        310        0.14       26.43
  23-Oct-19 |        310        0.14       26.56
  24-Oct-19 |        310        0.14       26.70
  25-Oct-19 |        310        0.14       26.84
  26-Oct-19 |        310        0.14       26.98
  27-Oct-19 |        310        0.14       27.12
  28-Oct-19 |        310        0.14       27.26
  29-Oct-19 |        310        0.14       27.40
  30-Oct-19 |        310        0.14       27.54
  31-Oct-19 |        310        0.14       27.68
   1-Nov-19 |        310        0.14       27.82
   2-Nov-19 |        310        0.14       27.96
   3-Nov-19 |        310        0.14       28.09
   4-Nov-19 |        310        0.14       28.23
   5-Nov-19 |        310        0.14       28.37
   6-Nov-19 |        310        0.14       28.51
   7-Nov-19 |        310        0.14       28.65
   8-Nov-19 |        310        0.14       28.79
   9-Nov-19 |        310        0.14       28.93
  10-Nov-19 |        310        0.14       29.07
  11-Nov-19 |        310        0.14       29.21
  12-Nov-19 |        310        0.14       29.35
  13-Nov-19 |        310        0.14       29.49
  14-Nov-19 |        310        0.14       29.62
  15-Nov-19 |        310        0.14       29.76
  16-Nov-19 |        310        0.14       29.90
  17-Nov-19 |        310        0.14       30.04
  18-Nov-19 |        310        0.14       30.18
  19-Nov-19 |        310        0.14       30.32
  20-Nov-19 |        310        0.14       30.46
  21-Nov-19 |        310        0.14       30.60
  22-Nov-19 |        310        0.14       30.74
  23-Nov-19 |        310        0.14       30.88
  24-Nov-19 |        310        0.14       31.02
  25-Nov-19 |        310        0.14       31.15
  26-Nov-19 |        310        0.14       31.29
  27-Nov-19 |        310        0.14       31.43
  28-Nov-19 |        310        0.14       31.57
  29-Nov-19 |        310        0.14       31.71
  30-Nov-19 |        310        0.14       31.85
   1-Dec-19 |        310        0.14       31.99
   2-Dec-19 |        310        0.14       32.13
   3-Dec-19 |        310        0.14       32.27
   4-Dec-19 |        310        0.14       32.41
   5-Dec-19 |        310        0.14       32.55
   6-Dec-19 |        310        0.14       32.68
   7-Dec-19 |        310        0.14       32.82
   8-Dec-19 |        310        0.14       32.96
   9-Dec-19 |        310        0.14       33.10
  10-Dec-19 |        310        0.14       33.24
  11-Dec-19 |        310        0.14       33.38
  12-Dec-19 |        310        0.14       33.52
  13-Dec-19 |        310        0.14       33.66
  14-Dec-19 |        310        0.14       33.80
  15-Dec-19 |        310        0.14       33.94
  16-Dec-19 |        310        0.14       34.08
  17-Dec-19 |        310        0.14       34.21
  18-Dec-19 |        310        0.14       34.35
  19-Dec-19 |        310        0.14       34.49
  20-Dec-19 |        310        0.14       34.63
  21-Dec-19 |        310        0.14       34.77
  22-Dec-19 |        310        0.14       34.91
  23-Dec-19 |        310        0.14       35.05
  24-Dec-19 |        310        0.14       35.19
  25-Dec-19 |        310        0.14       35.33
  26-Dec-19 |        310        0.14       35.47
  27-Dec-19 |        310        0.14       35.61
  28-Dec-19 |        310        0.14       35.74
  29-Dec-19 |        310        0.14       35.88
  30-Dec-19 |        310        0.14       36.02
  31-Dec-19 |        310        0.14       36.16
   1-Jan-20 |        310        0.14       36.30
   2-Jan-20 |        310        0.14       36.44
   3-Jan-20 |        310        0.14       36.58
   4-Jan-20 |        310        0.14       36.72
   5-Jan-20 |        310        0.14       36.86
   6-Jan-20 |        310        0.14       37.00
   7-Jan-20 |        310        0.14       37.13
   8-Jan-20 |        310        0.14       37.27
   9-Jan-20 |        310        0.14       37.41
  10-Jan-20 |        310        0.14       37.55
  11-Jan-20 |        310        0.14       37.69
  12-Jan-20 |        310        0.14       37.83
  13-Jan-20 |        310        0.14       37.97
  14-Jan-20 |        310        0.14       38.11
  15-Jan-20 |        310        0.14       38.25
  16-Jan-20 |        310        0.14       38.39
  17-Jan-20 |        310        0.14       38.53
  18-Jan-20 |        310        0.14       38.66
  19-Jan-20 |        310        0.14       38.80
  20-Jan-20 |        310        0.14       38.94
  21-Jan-20 |        310        0.14       39.08
  22-Jan-20 |        310        0.14       39.22
  23-Jan-20 |        310        0.14       39.36
  24-Jan-20 |        310        0.14       39.50
  25-Jan-20 |        310        0.14       39.64
  26-Jan-20 |        310        0.14       39.78
  27-Jan-20 |        310        0.14       39.92
  28-Jan-20 |        310        0.14       40.06
  29-Jan-20 |        310        0.14       40.19
  30-Jan-20 |        310        0.14       40.33
  31-Jan-20 |        310        0.14       40.47
   1-Feb-20 |        310        0.14       40.61
   2-Feb-20 |        310        0.14       40.75
   3-Feb-20 |        310        0.14       40.89
   4-Feb-20 |        310        0.14       41.03
   5-Feb-20 |        310        0.14       41.17
   6-Feb-20 |        310        0.14       41.31
   7-Feb-20 |        310        0.14       41.45
   8-Feb-20 |        310        0.14       41.59
   9-Feb-20 |        310        0.14       41.72
  10-Feb-20 |        310        0.14       41.86
  11-Feb-20 |        310        0.14       42.00
  12-Feb-20 |        310        0.14       42.14
  13-Feb-20 |        310        0.14       42.28
  14-Feb-20 |        310        0.14       42.42
  15-Feb-20 |        310        0.14       42.56
  16-Feb-20 |        310        0.14       42.70
  17-Feb-20 |        310        0.14       42.84
  18-Feb-20 |        310        0.14       42.98
  19-Feb-20 |        310        0.14       43.12
  20-Feb-20 |        310        0.14       43.25
  21-Feb-20 |        310        0.14       43.39
  22-Feb-20 |        310        0.14       43.53
  23-Feb-20 |        310        0.14       43.67
  24-Feb-20 |        310        0.14       43.81
  25-Feb-20 |        310        0.14       43.95
  26-Feb-20 |        310        0.14       44.09
  27-Feb-20 |        310        0.14       44.23
  28-Feb-20 |        310        0.14       44.37
  29-Feb-20 |        310        0.14       44.51
   1-Mar-20 |        310        0.14       44.65
   2-Mar-20 |        310        0.14       44.78
   3-Mar-20 |        310        0.14       44.92
   4-Mar-20 |        310        0.14       45.06
   5-Mar-20 |        310        0.14       45.20
   6-Mar-20 |        310        0.14       45.34
   7-Mar-20 |        310        0.14       45.48
   8-Mar-20 |        310        0.14       45.62
   9-Mar-20 |        310        0.14       45.76
  10-Mar-20 |        310        0.14       45.90
  11-Mar-20 |        310        0.14       46.04
  12-Mar-20 |        310        0.14       46.18
  13-Mar-20 |        310        0.14       46.31
  14-Mar-20 |        310        0.14       46.45
  15-Mar-20 |        310        0.14       46.59
  16-Mar-20 |        310        0.14       46.73
  17-Mar-20 |        310        0.14       46.87
  18-Mar-20 |        310        0.14       47.01
  19-Mar-20 |        310        0.14       47.15
  20-Mar-20 |        310        0.14       47.29
  21-Mar-20 |        310        0.14       47.43
  22-Mar-20 |        310        0.14       47.57
  23-Mar-20 |        310        0.14       47.71
  24-Mar-20 |        310        0.14       47.84
  25-Mar-20 |        310        0.14       47.98
  26-Mar-20 |        310        0.14       48.12
  27-Mar-20 |        310        0.14       48.26
  28-Mar-20 |        310        0.14       48.40
  29-Mar-20 |        310        0.14       48.54
  30-Mar-20 |        310        0.14       48.68
  31-Mar-20 |        310        0.14       48.82
   1-Apr-20 |        310        0.14       48.96
   2-Apr-20 |        310        0.14       49.10
   3-Apr-20 |        310        0.14       49.24
   4-Apr-20 |        310        0.14       49.37
   5-Apr-20 |        310        0.14       49.51
   6-Apr-20 |        310        0.14       49.65
   7-Apr-20 |        310        0.14       49.79
   8-Apr-20 |        310        0.14       49.93
   9-Apr-20 |        310        0.14       50.07
  10-Apr-20 |        310        0.14       50.21
  11-Apr-20 |        310        0.14       50.35
  12-Apr-20 |        310        0.14       50.49
  13-Apr-20 |        310        0.14       50.63
  14-Apr-20 |        310        0.14       50.76
  15-Apr-20 |        310        0.14       50.90
  16-Apr-20 |        310        0.14       51.04
  17-Apr-20 |        310        0.14       51.18
  18-Apr-20 |        310        0.14       51.32
  19-Apr-20 |        310        0.14       51.46
  20-Apr-20 |        310        0.14       51.60
  21-Apr-20 |        310        0.14       51.74
  22-Apr-20 |        310        0.14       51.88
  23-Apr-20 |        310        0.14       52.02
  24-Apr-20 |        310        0.14       52.16
  25-Apr-20 |        310        0.14       52.29
  26-Apr-20 |        310        0.14       52.43
  27-Apr-20 |        310        0.14       52.57
  28-Apr-20 |        310        0.14       52.71
  29-Apr-20 |        310        0.14       52.85
  30-Apr-20 |        310        0.14       52.99
   1-May-20 |        310        0.14       53.13
   2-May-20 |        310        0.14       53.27
   3-May-20 |        310        0.14       53.41
   4-May-20 |        310        0.14       53.55
   5-May-20 |        310        0.14       53.69
   6-May-20 |        310        0.14       53.82
   7-May-20 |        310        0.14       53.96
   8-May-20 |        310        0.14       54.10
   9-May-20 |        310        0.14       54.24
  10-May-20 |        310        0.14       54.38
  11-May-20 |        310        0.14       54.52
  12-May-20 |        310        0.14       54.66
  13-May-20 |        310        0.14       54.80
  14-May-20 |        310        0.14       54.94
  15-May-20 |        310        0.14       55.08
  16-May-20 |        310        0.14       55.22
  17-May-20 |        310        0.14       55.35
  18-May-20 |        310        0.14       55.49
  19-May-20 |        310        0.14       55.63
  20-May-20 |        310        0.14       55.77
  21-May-20 |        310        0.14       55.91
  22-May-20 |        310        0.14       56.05
  23-May-20 |        310        0.14       56.19
  24-May-20 |        310        0.14       56.33
  25-May-20 |        310        0.14       56.47
  26-May-20 |        310        0.14       56.61
  27-May-20 |        310        0.14       56.75
  28-May-20 |        310        0.14       56.88
  29-May-20 |        310        0.14       57.02
  30-May-20 |        310        0.14       57.16
  31-May-20 |        310        0.14       57.30
   1-Jun-20 |        310        0.14       57.44
   2-Jun-20 |        310        0.14       57.58
   3-Jun-20 |        310        0.14       57.72
   4-Jun-20 |        310        0.14       57.86
   5-Jun-20 |        310        0.14       58.00
   6-Jun-20 |        310        0.14       58.14
   7-Jun-20 |        310        0.14       58.28
   8-Jun-20 |        310        0.14       58.41
   9-Jun-20 |        310        0.14       58.55
  10-Jun-20 |        310        0.14       58.69
  11-Jun-20 |        310        0.14       58.83
  12-Jun-20 |        310        0.14       58.97
  13-Jun-20 |        310        0.14       59.11
  14-Jun-20 |        310        0.14       59.25
  15-Jun-20 |        310        0.14       59.39
  16-Jun-20 |        310        0.14       59.53
  17-Jun-20 |        310        0.14       59.67
  18-Jun-20 |        310        0.14       59.81
  19-Jun-20 |        310        0.14       59.94
  20-Jun-20 |        310        0.14       60.08
  21-Jun-20 |        310        0.14       60.22
  22-Jun-20 |        310        0.14       60.36
  23-Jun-20 |        310        0.14       60.50
  24-Jun-20 |        310        0.14       60.64
  25-Jun-20 |        310        0.14       60.78
  26-Jun-20 |        310        0.14       60.92
  27-Jun-20 |        310        0.14       61.06
  28-Jun-20 |        310        0.14       61.20
  29-Jun-20 |        310        0.14       61.34
  30-Jun-20 |        310        0.14       61.47
   1-Jul-20 |        310        0.14       61.61
   2-Jul-20 |        310        0.14       61.75
   3-Jul-20 |        310        0.14       61.89
   4-Jul-20 |        310        0.14       62.03
   5-Jul-20 |        310        0.14       62.17
   6-Jul-20 |        310        0.14       62.31
   7-Jul-20 |        310        0.14       62.45
   8-Jul-20 |        310        0.14       62.59
   9-Jul-20 |        310        0.14       62.73
  10-Jul-20 |        310        0.14       62.87
  11-Jul-20 |        310        0.14       63.00
  12-Jul-20 |        310        0.14       63.14
  13-Jul-20 |        310        0.14       63.28
  14-Jul-20 |        310        0.14       63.42
  15-Jul-20 |        310        0.14       63.56
  16-Jul-20 |        310        0.14       63.70
  17-Jul-20 |        310        0.14       63.84
  18-Jul-20 |        310        0.14       63.98
  19-Jul-20 |        310        0.14       64.12
  20-Jul-20 |        310        0.14       64.26
  21-Jul-20 |        310        0.14       64.39
  22-Jul-20 |        310        0.14       64.53
  23-Jul-20 |        310        0.14       64.67
  24-Jul-20 |        310        0.14       64.81
  25-Jul-20 |        310        0.14       64.95
  26-Jul-20 |        310        0.14       65.09
  27-Jul-20 |        310        0.14       65.23
  28-Jul-20 |        310        0.14       65.37
  29-Jul-20 |        310        0.14       65.51
  30-Jul-20 |        310        0.14       65.65
  31-Jul-20 |        310        0.14       65.79
   1-Aug-20 |        310        0.14       65.92
   2-Aug-20 |        310        0.14       66.06
   3-Aug-20 |        310        0.14       66.20
   4-Aug-20 |        310        0.14       66.34
   5-Aug-20 |        310        0.14       66.48
   6-Aug-20 |        310        0.14       66.62
   7-Aug-20 |        310        0.14       66.76
   8-Aug-20 |        310        0.14       66.90
   9-Aug-20 |        310        0.14       67.04
  10-Aug-20 |        310        0.14       67.18
  11-Aug-20 |        310        0.14       67.32
  12-Aug-20 |        310        0.14       67.45
  13-Aug-20 |        310        0.14       67.59
  14-Aug-20 |        310        0.14       67.73
  15-Aug-20 |        310        0.14       67.87
  16-Aug-20 |        310        0.14       68.01
  17-Aug-20 |        310        0.14       68.15
  18-Aug-20 |        310        0.14       68.29
  19-Aug-20 |        310        0.14       68.43
  20-Aug-20 |        310        0.14       68.57
  21-Aug-20 |        310        0.14       68.71
  22-Aug-20 |        310        0.14       68.85
  23-Aug-20 |        310        0.14       68.98
  24-Aug-20 |        310        0.14       69.12
  25-Aug-20 |        310        0.14       69.26
  26-Aug-20 |        310        0.14       69.40
  27-Aug-20 |        310        0.14       69.54
  28-Aug-20 |        310        0.14       69.68
  29-Aug-20 |        310        0.14       69.82
  30-Aug-20 |        310        0.14       69.96
  31-Aug-20 |        310        0.14       70.10
   1-Sep-20 |        310        0.14       70.24
   2-Sep-20 |        310        0.14       70.38
   3-Sep-20 |        310        0.14       70.51
   4-Sep-20 |        310        0.14       70.65
   5-Sep-20 |        310        0.14       70.79
   6-Sep-20 |        310        0.14       70.93
   7-Sep-20 |        310        0.14       71.07
   8-Sep-20 |        310        0.14       71.21
   9-Sep-20 |        310        0.14       71.35
  10-Sep-20 |        310        0.14       71.49
  11-Sep-20 |        310        0.14       71.63
  12-Sep-20 |        310        0.14       71.77
  13-Sep-20 |        310        0.14       71.91
  14-Sep-20 |        310        0.14       72.04
  15-Sep-20 |        310        0.14       72.18
  16-Sep-20 |        310        0.14       72.32
  17-Sep-20 |        310        0.14       72.46
  18-Sep-20 |        310        0.14       72.60
  19-Sep-20 |        310        0.14       72.74
  20-Sep-20 |        310        0.14       72.88
  21-Sep-20 |        310        0.14       73.02
  22-Sep-20 |        310        0.14       73.16
  23-Sep-20 |        310        0.14       73.30
  24-Sep-20 |        310        0.14       73.44
  25-Sep-20 |        310        0.14       73.57
  26-Sep-20 |        310        0.14       73.71
  27-Sep-20 |        310        0.14       73.85
  28-Sep-20 |        310        0.14       73.99
  29-Sep-20 |        310        0.14       74.13
  30-Sep-20 |        310        0.14       74.27
   1-Oct-20 |        310        0.14       74.41
   2-Oct-20 |        310        0.14       74.55
   3-Oct-20 |        310        0.14       74.69
   4-Oct-20 |        310        0.14       74.83
   5-Oct-20 |        310        0.14       74.97
   6-Oct-20 |        310        0.14       75.10
   7-Oct-20 |        310        0.14       75.24
   8-Oct-20 |        310        0.14       75.38
   9-Oct-20 |        310        0.14       75.52
  10-Oct-20 |        310        0.14       75.66
  11-Oct-20 |        310        0.14       75.80
  12-Oct-20 |        310        0.14       75.94
  13-Oct-20 |        310        0.14       76.08
  14-Oct-20 |        310        0.14       76.22
  15-Oct-20 |        310        0.14       76.36
  16-Oct-20 |        310        0.14       76.50
  17-Oct-20 |        310        0.14       76.63
  18-Oct-20 |        310        0.14       76.77
  19-Oct-20 |        310        0.14       76.91
  20-Oct-20 |        310        0.14       77.05
  21-Oct-20 |        310        0.14       77.19
  22-Oct-20 |        310        0.14       77.33
  23-Oct-20 |        310        0.14       77.47
  24-Oct-20 |        310        0.14       77.61
  25-Oct-20 |        310        0.14       77.75
  26-Oct-20 |        310        0.14       77.89
  27-Oct-20 |        310        0.14       78.03
  28-Oct-20 |        310        0.14       78.16
  29-Oct-20 |        310        0.14       78.30
  30-Oct-20 |        310        0.14       78.44
  31-Oct-20 |        310        0.14       78.58
   1-Nov-20 |        310        0.14       78.72
   2-Nov-20 |        310        0.14       78.86
   3-Nov-20 |        310        0.14       79.00
   4-Nov-20 |        310        0.14       79.14
   5-Nov-20 |        310        0.14       79.28
   6-Nov-20 |        310        0.14       79.42
   7-Nov-20 |        310        0.14       79.55
   8-Nov-20 |        310        0.14       79.69
   9-Nov-20 |        310        0.14       79.83
  10-Nov-20 |        310        0.14       79.97
  11-Nov-20 |        310        0.14       80.11
  12-Nov-20 |        310        0.14       80.25
  13-Nov-20 |        310        0.14       80.39
  14-Nov-20 |        310        0.14       80.53
  15-Nov-20 |        310        0.14       80.67
  16-Nov-20 |        310        0.14       80.81
  17-Nov-20 |        310        0.14       80.95
  18-Nov-20 |        310        0.14       81.08
  19-Nov-20 |        310        0.14       81.22
  20-Nov-20 |        310        0.14       81.36
  21-Nov-20 |        310        0.14       81.50
  22-Nov-20 |        310        0.14       81.64
  23-Nov-20 |        310        0.14       81.78
  24-Nov-20 |        310        0.14       81.92
  25-Nov-20 |        310        0.14       82.06
  26-Nov-20 |        310        0.14       82.20
  27-Nov-20 |        310        0.14       82.34
  28-Nov-20 |        310        0.14       82.48
  29-Nov-20 |        310        0.14       82.61
  30-Nov-20 |        310        0.14       82.75
   1-Dec-20 |        310        0.14       82.89
   2-Dec-20 |        310        0.14       83.03
   3-Dec-20 |        310        0.14       83.17
   4-Dec-20 |        310        0.14       83.31
   5-Dec-20 |        310        0.14       83.45
   6-Dec-20 |        310        0.14       83.59
   7-Dec-20 |        310        0.14       83.73
   8-Dec-20 |        310        0.14       83.87
   9-Dec-20 |        310        0.14       84.01
  10-Dec-20 |        310        0.14       84.14
  11-Dec-20 |        310        0.14       84.28
  12-Dec-20 |        310        0.14       84.42
  13-Dec-20 |        310        0.14       84.56
  14-Dec-20 |        310        0.14       84.70
  15-Dec-20 |        310        0.14       84.84
  16-Dec-20 |        310        0.14       84.98
  17-Dec-20 |        310        0.14       85.12
  18-Dec-20 |        310        0.14       85.26
  19-Dec-20 |        310        0.14       85.40
  20-Dec-20 |        310        0.14       85.54
  21-Dec-20 |        310        0.14       85.67
  22-Dec-20 |        310        0.14       85.81
  23-Dec-20 |        310        0.14       85.95
  24-Dec-20 |        310        0.14       86.09
  25-Dec-20 |        310        0.14       86.23
  26-Dec-20 |        310        0.14       86.37
  27-Dec-20 |        310        0.14       86.51
  28-Dec-20 |        310        0.14       86.65
  29-Dec-20 |        310        0.14       86.79
  30-Dec-20 |        310        0.14       86.93
  31-Dec-20 |        310        0.14       87.07
   1-Jan-21 |        310        0.14       87.20
   2-Jan-21 |        310        0.14       87.34
   3-Jan-21 |        310        0.14       87.48
   4-Jan-21 |        310        0.14       87.62
   5-Jan-21 |        310        0.14       87.76
   6-Jan-21 |        310        0.14       87.90
   7-Jan-21 |        310        0.14       88.04
   8-Jan-21 |        310        0.14       88.18
   9-Jan-21 |        310        0.14       88.32
  10-Jan-21 |        310        0.14       88.46
  11-Jan-21 |        310        0.14       88.60
  12-Jan-21 |        310        0.14       88.73
  13-Jan-21 |        310        0.14       88.87
  14-Jan-21 |        310        0.14       89.01
  15-Jan-21 |        310        0.14       89.15
  16-Jan-21 |        310        0.14       89.29
  17-Jan-21 |        310        0.14       89.43
  18-Jan-21 |        310        0.14       89.57
  19-Jan-21 |        310        0.14       89.71
  20-Jan-21 |        310        0.14       89.85
  21-Jan-21 |        310        0.14       89.99
  22-Jan-21 |        310        0.14       90.13
  23-Jan-21 |        310        0.14       90.26
  24-Jan-21 |        310        0.14       90.40
  25-Jan-21 |        310        0.14       90.54
  26-Jan-21 |        310        0.14       90.68
  27-Jan-21 |        310        0.14       90.82
  28-Jan-21 |        310        0.14       90.96
  29-Jan-21 |        310        0.14       91.10
  30-Jan-21 |        310        0.14       91.24
  31-Jan-21 |        310        0.14       91.38
   1-Feb-21 |        310        0.14       91.52
   2-Feb-21 |        310        0.14       91.66
   3-Feb-21 |        310        0.14       91.79
   4-Feb-21 |        310        0.14       91.93
   5-Feb-21 |        310        0.14       92.07
   6-Feb-21 |        310        0.14       92.21
   7-Feb-21 |        310        0.14       92.35
   8-Feb-21 |        310        0.14       92.49
   9-Feb-21 |        310        0.14       92.63
  10-Feb-21 |        310        0.14       92.77
  11-Feb-21 |        310        0.14       92.91
  12-Feb-21 |        310        0.14       93.05
  13-Feb-21 |        310        0.14       93.18
  14-Feb-21 |        310        0.14       93.32
  15-Feb-21 |        310        0.14       93.46
  16-Feb-21 |        310        0.14       93.60
  17-Feb-21 |        310        0.14       93.74
  18-Feb-21 |        310        0.14       93.88
  19-Feb-21 |        310        0.14       94.02
  20-Feb-21 |        310        0.14       94.16
  21-Feb-21 |        310        0.14       94.30
  22-Feb-21 |        310        0.14       94.44
  23-Feb-21 |        310        0.14       94.58
  24-Feb-21 |        310        0.14       94.71
  25-Feb-21 |        310        0.14       94.85
  26-Feb-21 |        310        0.14       94.99
  27-Feb-21 |        310        0.14       95.13
  28-Feb-21 |        310        0.14       95.27
   1-Mar-21 |        310        0.14       95.41
   2-Mar-21 |        310        0.14       95.55
   3-Mar-21 |        310        0.14       95.69
   4-Mar-21 |        310        0.14       95.83
   5-Mar-21 |        310        0.14       95.97
   6-Mar-21 |        310        0.14       96.11
   7-Mar-21 |        310        0.14       96.24
   8-Mar-21 |        310        0.14       96.38
   9-Mar-21 |        310        0.14       96.52
  10-Mar-21 |        310        0.14       96.66
  11-Mar-21 |        310        0.14       96.80
  12-Mar-21 |        310        0.14       96.94
  13-Mar-21 |        310        0.14       97.08
  14-Mar-21 |        310        0.14       97.22
  15-Mar-21 |        310        0.14       97.36
  16-Mar-21 |        310        0.14       97.50
  17-Mar-21 |        310        0.14       97.64
  18-Mar-21 |        310        0.14       97.77
  19-Mar-21 |        310        0.14       97.91
  20-Mar-21 |        310        0.14       98.05
  21-Mar-21 |        310        0.14       98.19
  22-Mar-21 |        310        0.14       98.33
  23-Mar-21 |        310        0.14       98.47
  24-Mar-21 |        310        0.14       98.61
  25-Mar-21 |        310        0.14       98.75
  26-Mar-21 |        310        0.14       98.89
  27-Mar-21 |        310        0.14       99.03
  28-Mar-21 |        310        0.14       99.17
  29-Mar-21 |        310        0.14       99.30
  30-Mar-21 |        310        0.14       99.44
  31-Mar-21 |        310        0.14       99.58
   1-Apr-21 |        310        0.14       99.72
   2-Apr-21 |        310        0.14       99.86
   3-Apr-21 |        310        0.14      100.00
------------+-----------------------------------
      Total |    222,890      100.00

. ** 222,890 Observations. 310 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. gen period = 0

. ** Mock-I
. replace period = 0 if date >= td(15jul2019) 
(0 real changes made)

. ** Mock-II
. replace period = 0 if date >= td(13aug2019)
(0 real changes made)

. ** Comp-I
. replace period = 1 if date >= td(16sep2019)
(175,460 real changes made)

. ** Comp-II
. replace period = 2 if date >= td(16oct2019)
(166,160 real changes made)

. ** Comp-III
. replace period = 3 if date >= td(16nov2019)
(156,550 real changes made)

. ** Comp-IV
. replace period = 4 if date >= td(01jan2020)
(142,290 real changes made)

. ** Comp-V
. replace period = 5 if date >= td(01feb2020)
(132,680 real changes made)

. ** Comp-VI
. replace period = 6 if date >= td(01mar2020)
(123,690 real changes made)

. ** Interregnum-I
. replace period = 0 if date >= td(22mar2020)
(117,180 real changes made)

. ** Mock-III
. replace period = 0 if date >= td(12oct2020)
(0 real changes made)

. ** Interregnum-II
. replace period = 0 if date >= td(12nov2020)
(0 real changes made)

. ** Comp-VII
. replace period = 7 if date >= td(01dec2020)
(38,440 real changes made)

. ** Comp-VIII
. replace period = 8 if date >= td(01jan2021)
(28,830 real changes made)

. ** Comp-IX
. replace period = 9 if date >= td(01feb2021)
(19,220 real changes made)

. ** Comp-X
. replace period = 10 if date >= td(01mar2021)
(10,540 real changes made)

. 
. drop if date >=  td(01apr2021)
(930 observations deleted)

. 
. *tab period if composite_id == "GJSRT100740111"
. gen temp = 1

. bysort period: egen period_length = sum(temp) 

. replace period_length = period_length / 310 
(221,960 real changes made)

. drop temp

. 
. ********************************************************************************
. ********************* [1] CALCULATE ACTUAL STACK DAY MASS **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Replace tot_report_hrs to zero 
.         ** if the stack was not sending a valid caliberated stack-day kg/hr that day
.         gen tot_report_hrs_rule`i' = tot_report_hrs
  3.         replace tot_report_hrs_rule`i' = 0 if D_vctransmitting_rule`i' == 0
  4.         label var tot_report_hrs_rule`i' ///
>                 "[RE-LABELED] Stack-day VALID CALIBRATED Reporting Hours from CEMS - rule `i'"
  5. 
.         ** Calculate DAILY actual mass emissions using CEMA Day Reporting Hours
.         gen stack_daily_mass_actual_rule`i' = pm_mass_rule`i' * tot_report_hrs_rule`i'
  6.         la var stack_daily_mass_actual_rule`i' ///
>                 "Stack Day Actual Mass Emissions (kg) from CEMS Reported Hours - rule `i'"
  7. 
. }
(13,799 real changes made)
(92,287 missing values generated)
(13,140 real changes made)
(91,628 missing values generated)
(51,614 real changes made)
(130,102 missing values generated)
(51,140 real changes made)
(129,628 missing values generated)
(71,887 real changes made)
(150,375 missing values generated)
(71,520 real changes made)
(150,008 missing values generated)
(60,805 real changes made)
(139,293 missing values generated)
(60,375 real changes made)
(138,863 missing values generated)
(30,192 real changes made)
(108,680 missing values generated)
(29,607 real changes made)
(108,095 missing values generated)

. 
. ********************************************************************************
. ***************** [2] DAILY NON-REPORTING HOURS FOR IMPUTATION *****************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate DAILY non-reporting hours for imputation
.         gen daily_nonreport_hrs_rule`i' = 24 - tot_report_hrs_rule`i'
  3.         order daily_nonreport_hrs_rule`i', a(tot_report_hrs_rule`i')
  4.         la var daily_nonreport_hrs_rule`i' ///
>                 "Stack Day NON-Reporting Hours - CEMS - rule `i'"
  5. 
. }

. 
. ********************************************************************************
. ********* [3] For Imp: GENERATE STACK'S OWN WEEK and MONTH MEAN KG/HR **********
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate stack's own week mean kg/hr for missing pm mass values
.         bysort composite_id week: egen week_mean_mass_rule`i' = mean(pm_mass_rule`i')
  3.         label var week_mean_mass_rule`i' "Stack Week Mean kg/hr - rule `i'"
  4. 
.         ** Calculate stack's own experiment mean kg/hr for stacks missing entire week of pm mass
.         bysort composite_id: egen stack_mean_mass_rule`i' = mean(pm_mass_rule`i') if ///
>                 (date >= td(16Jul2019)) & (D_interregnum_week == 0)
  5.         la var stack_mean_mass_rule`i' "Stack Experiment Mean kg/hr - rule `i'"
  6. 
. }
(77,577 missing values generated)
(95,480 missing values generated)
(77,038 missing values generated)
(95,480 missing values generated)
(119,197 missing values generated)
(138,320 missing values generated)
(118,820 missing values generated)
(138,320 missing values generated)
(141,323 missing values generated)
(157,496 missing values generated)
(141,099 missing values generated)
(157,496 missing values generated)
(129,488 missing values generated)
(147,296 missing values generated)
(129,167 missing values generated)
(147,296 missing values generated)
(95,938 missing values generated)
(118,736 missing values generated)
(95,484 missing values generated)
(118,736 missing values generated)

. 
. /*******************************************************************************
>            NOW READY FOR IMPUTATION RULE 0b.
>            THE IMPLEMENTATION OF THIS RULE WILL BE:
> 
>            1)   IMPUTE STACK'S OWN WEEK MEAN PM_MASS (KG/HR) FOR ALL MISSING VALUES
>            OF STACK DAY PM_MASS (KG/HR). 
>            2)   IF WEEK MEAN KG/HR IS MISSING, IMPUTE EXPERIMENT MEAN PM_MASS (KG/HR)
>            3)   THE FINAL EMISSION QUANTITY IS:
> 
>            VALIDATED STACK MASS (KG) = 
>            ACTUAL STACK MASS (KG) USING CEMS REPORTED HOURS +
>            IMPUTED STACK MASS (KG) USING CEMS NON-REPORTED HOURS
>    ****************************************************************************/
. 
. 
. ********************************************************************************
. ******************** [4] CALCULATE DAILY STACK IMPUTED MASS ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate PER DAY imputed emissions
.         gen stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * week_mean_mass_rule`i'
  3.         replace stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * stack_mean_mass_rule`i' ///
>                 if week_mean_mass_rule`i' == .
  4.         la var stack_daily_mass_imp_rule`i' ///
>                 "Stack-day Imputed Mass Emissions (kg) from CEMS Non-Reported Hours - rule`i'"
  5. 
.         ** Correct for week of Diwali 2019 when imputation should be zero.
.         replace stack_daily_mass_imp_rule`i' = 0 if ///
>                 date >= date("2019oct26", "YMD") & ///
>                 date <= date("2019nov03", "YMD") & ///
>                 stack_daily_mass_imp_rule`i' != .
  6. 
. }
(77,577 missing values generated)
(26,226 real changes made)
(1,899 real changes made)
(77,038 missing values generated)
(25,870 real changes made)
(1,887 real changes made)
(119,197 missing values generated)
(13,947 real changes made)
(1,203 real changes made)
(118,820 missing values generated)
(13,696 real changes made)
(1,198 real changes made)
(141,323 missing values generated)
(11,055 real changes made)
(976 real changes made)
(141,099 missing values generated)
(10,880 real changes made)
(971 real changes made)
(129,488 missing values generated)
(12,424 real changes made)
(1,093 real changes made)
(129,167 missing values generated)
(12,202 real changes made)
(1,088 real changes made)
(95,938 missing values generated)
(16,319 real changes made)
(1,489 real changes made)
(95,484 missing values generated)
(16,020 real changes made)
(1,478 real changes made)

. 
. ********************************************************************************
. ******************* [5] CALCULATE DAILY STACK VALIDATED MASS *******************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate validated DAY emissions per stack
.         gen stack_daily_mass_val_rule`i' = stack_daily_mass_actual_rule`i' + stack_daily_mass_imp_rule`i'
  3.         replace stack_daily_mass_val_rule`i' = stack_daily_mass_imp_rule`i' ///
>                 if stack_daily_mass_val_rule`i' == .
  4.         la var stack_daily_mass_val_rule`i' ///
>                 "Stack Day Validated Mass Emissions (kg) (=Stack-day Actual + Stack-day Imp) - rule `i'"
  5. 
. }
(92,287 missing values generated)
(40,936 real changes made)
note: label truncated to 80 characters
(91,628 missing values generated)
(40,460 real changes made)
note: label truncated to 80 characters
(130,102 missing values generated)
(24,852 real changes made)
note: label truncated to 80 characters
(129,628 missing values generated)
(24,504 real changes made)
note: label truncated to 80 characters
(150,375 missing values generated)
(20,107 real changes made)
note: label truncated to 80 characters
(150,008 missing values generated)
(19,789 real changes made)
note: label truncated to 80 characters
(139,293 missing values generated)
(22,229 real changes made)
note: label truncated to 80 characters
(138,863 missing values generated)
(21,898 real changes made)
note: label truncated to 80 characters
(108,680 missing values generated)
(29,061 real changes made)
note: label truncated to 80 characters
(108,095 missing values generated)
(28,631 real changes made)
note: label truncated to 80 characters

. 
. /*******************************************************************************
>            NOW READY TO MAKE THE DEPENDENT VARIABLE FOR REGRESSIONS IN PART 6 
>            (6. TREATMENT EFFECT ANALYSIS). THIS VAR IS PLANT MONTH MASS (KG).
> 
>            STEPS TO CREATE THIS VARIABLE WILL BE:
> 
>            6.1) CALCULATE STACK WEEK MASS (KG), AND THEN PLANT WEEK MASS (KG).
>            FIRST GENERATE THESE VARIABLES IN THE STACK-DAY LEVEL DATA SET.
>            AND SAVE IT FOR FUTURE USE IF NEEDED ("_StackDayLevel.dta").
> 
>            6.2) THEN, COLLAPSE THE STACK-DAY LEVEL DATA SET TO KEEP ONE DATA POINT 
>            PER PLANT PER WEEK ("_PlantWeekLevel.dta"). 
> 
>            CONTAINS THE DEPENDENT VARIABLE: PLANT-WEEK MASS (KG) EMISSIONS 
>            USING IMPUTATION RULE 0.
>    ****************************************************************************/
. 
. preserve

. 
. ********************************************************************************
. ********************* [6.1] GENERATE STACK-MONTH MASS (KG) *********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER STACK
.         bysort composite_id period: egen stack_period_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id period: egen miss_stack_period_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_period_mass_val_rule`i' = . if miss_stack_period_mass_val == 1
  5.         la var stack_period_mass_val_rule`i' ///
>                 "Stack-period Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_stack_period_mass_val
  7. 
. }
(123,728 real changes made, 123,728 to missing)
(123,728 real changes made, 123,728 to missing)
(156,173 real changes made, 156,173 to missing)
(156,173 real changes made, 156,173 to missing)
(170,696 real changes made, 170,696 to missing)
(170,696 real changes made, 170,696 to missing)
(162,971 real changes made, 162,971 to missing)
(162,971 real changes made, 162,971 to missing)
(141,341 real changes made, 141,341 to missing)
(141,341 real changes made, 141,341 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id period: gen dump=_n

. bysort composite_id period: keep if _n==_N      
(218,550 observations deleted)

. keep composite_id industry_id gpcb_id period period_length treatmentstatus stack_period_mass_val* 

. 
. ** 3,410 observations. 310 stacks. 11 periods
. 
. ********************************************************************************
. ******************** [6.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. /**     AS PER NICK'S INSTRUCTION ON WEEKLY CALL 01 DEC 2020: FOR PLANTS WITH >1 STACK, 
>            WE WILL ONLY CALCULATE THEIR PLANT MASS (KG) SUM IF ALL STACKS ARE CONNECTED. 
>            IF STACKS ARE PARTIALLY CONNECTED (i.e., ONLY 1 OF 3 STACKS CONNECTED), 
>    THE ENTIRE PLANT SUM WILL BE MISSING.        **/
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER PLANT
.         bysort gpcb_id period: egen ind_period_mass_val_rule`i' = sum(stack_period_mass_val_rule`i')
  3.         bysort gpcb_id period: egen miss_ind_period_mass_val = max(missing(stack_period_mass_val_rule`i'))
  4.         replace ind_period_mass_val_rule`i' = . if miss_ind_period_mass_val == 1
  5.         la var ind_period_mass_val_rule`i' ///
>                 "Plant-month Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_period_mass_val
  7. 
. }
(304 real changes made, 304 to missing)
(304 real changes made, 304 to missing)
(1,354 real changes made, 1,354 to missing)
(1,354 real changes made, 1,354 to missing)
(1,824 real changes made, 1,824 to missing)
(1,824 real changes made, 1,824 to missing)
(1,574 real changes made, 1,574 to missing)
(1,574 real changes made, 1,574 to missing)
(874 real changes made, 874 to missing)
(874 real changes made, 874 to missing)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id period: gen dump=_n

. bysort gpcb_id period: keep if _n==_N
(198 observations deleted)

. keep industry_id gpcb_id period period_length treatmentstatus ind_period_mass_val* 

. keep if period > 0
(292 observations deleted)

. ** 2,920 observations. 292 plants. 10 periods.
. 
. save "$IMPUTATION_DATA_OUT/PlantPeriodPMMassRuleA.dta", replace
(file 02DataPipeline/emissions/imputation/PlantPeriodPMMassRuleA.dta not found)
file 02DataPipeline/emissions/imputation/PlantPeriodPMMassRuleA.dta saved

. 
. restore

. 
end of do-file

. do "$CODE_DIR/imputation/4. Create PM Mass (Treatment-Month, Plant-Month).do"

. /*******************************************************************************
>            Author:      Dipika Gawande
>            Project: ETS
>            Purpose: Create the dependent variable for regression, PLANT-MONTH KG 
>            EMISSIONS (KG/MONTH), using IMPUTATION RULE C: WITHIN-TREATMENT 
>            MEAN MONTH KG/HR.
> 
>            NOTE: IMPUTATION RULE C is executed as follows:
> 
>            1) Missing values of Stack day kg/hr are imputed with the stack's 
>            own week mean kg/hr.
> 
>            2) If no week mean kg/hr (i.e., stack is missing entire week of 
>            stack-day observations, or is not CEMS-connected), all remaining 
>            missing values of Stack day kg/hr are imputed with the Treatment 
>            arm month mean kg/hr.
> 
>            Date created: 01 August 2020
>            Version: STATA 15 MP
> 
>            Last edited: 13 January 2022
>            Edited by: Jeanne, Vineet, Kaixin
>    ****************************************************************************/
. 
. set more off

. clear all

. pause on

. 
. *----------------------------------------------------------------------
. 
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. drop if date < date("2019jan16", "YMD")
(0 observations deleted)

. format date %tddd-Mon-YY

. sort date composite_id

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        337        0.14        0.14
  17-Apr-19 |        337        0.14        0.28
  18-Apr-19 |        337        0.14        0.42
  19-Apr-19 |        337        0.14        0.56
  20-Apr-19 |        337        0.14        0.70
  21-Apr-19 |        337        0.14        0.83
  22-Apr-19 |        337        0.14        0.97
  23-Apr-19 |        337        0.14        1.11
  24-Apr-19 |        337        0.14        1.25
  25-Apr-19 |        337        0.14        1.39
  26-Apr-19 |        337        0.14        1.53
  27-Apr-19 |        337        0.14        1.67
  28-Apr-19 |        337        0.14        1.81
  29-Apr-19 |        337        0.14        1.95
  30-Apr-19 |        337        0.14        2.09
   1-May-19 |        337        0.14        2.23
   2-May-19 |        337        0.14        2.36
   3-May-19 |        337        0.14        2.50
   4-May-19 |        337        0.14        2.64
   5-May-19 |        337        0.14        2.78
   6-May-19 |        337        0.14        2.92
   7-May-19 |        337        0.14        3.06
   8-May-19 |        337        0.14        3.20
   9-May-19 |        337        0.14        3.34
  10-May-19 |        337        0.14        3.48
  11-May-19 |        337        0.14        3.62
  12-May-19 |        337        0.14        3.76
  13-May-19 |        337        0.14        3.89
  14-May-19 |        337        0.14        4.03
  15-May-19 |        337        0.14        4.17
  16-May-19 |        337        0.14        4.31
  17-May-19 |        337        0.14        4.45
  18-May-19 |        337        0.14        4.59
  19-May-19 |        337        0.14        4.73
  20-May-19 |        337        0.14        4.87
  21-May-19 |        337        0.14        5.01
  22-May-19 |        337        0.14        5.15
  23-May-19 |        337        0.14        5.29
  24-May-19 |        337        0.14        5.42
  25-May-19 |        337        0.14        5.56
  26-May-19 |        337        0.14        5.70
  27-May-19 |        337        0.14        5.84
  28-May-19 |        337        0.14        5.98
  29-May-19 |        337        0.14        6.12
  30-May-19 |        337        0.14        6.26
  31-May-19 |        337        0.14        6.40
   1-Jun-19 |        337        0.14        6.54
   2-Jun-19 |        337        0.14        6.68
   3-Jun-19 |        337        0.14        6.82
   4-Jun-19 |        337        0.14        6.95
   5-Jun-19 |        337        0.14        7.09
   6-Jun-19 |        337        0.14        7.23
   7-Jun-19 |        337        0.14        7.37
   8-Jun-19 |        337        0.14        7.51
   9-Jun-19 |        337        0.14        7.65
  10-Jun-19 |        337        0.14        7.79
  11-Jun-19 |        337        0.14        7.93
  12-Jun-19 |        337        0.14        8.07
  13-Jun-19 |        337        0.14        8.21
  14-Jun-19 |        337        0.14        8.34
  15-Jun-19 |        337        0.14        8.48
  16-Jun-19 |        337        0.14        8.62
  17-Jun-19 |        337        0.14        8.76
  18-Jun-19 |        337        0.14        8.90
  19-Jun-19 |        337        0.14        9.04
  20-Jun-19 |        337        0.14        9.18
  21-Jun-19 |        337        0.14        9.32
  22-Jun-19 |        337        0.14        9.46
  23-Jun-19 |        337        0.14        9.60
  24-Jun-19 |        337        0.14        9.74
  25-Jun-19 |        337        0.14        9.87
  26-Jun-19 |        337        0.14       10.01
  27-Jun-19 |        337        0.14       10.15
  28-Jun-19 |        337        0.14       10.29
  29-Jun-19 |        337        0.14       10.43
  30-Jun-19 |        337        0.14       10.57
   1-Jul-19 |        337        0.14       10.71
   2-Jul-19 |        337        0.14       10.85
   3-Jul-19 |        337        0.14       10.99
   4-Jul-19 |        337        0.14       11.13
   5-Jul-19 |        337        0.14       11.27
   6-Jul-19 |        337        0.14       11.40
   7-Jul-19 |        337        0.14       11.54
   8-Jul-19 |        337        0.14       11.68
   9-Jul-19 |        337        0.14       11.82
  10-Jul-19 |        337        0.14       11.96
  11-Jul-19 |        337        0.14       12.10
  12-Jul-19 |        337        0.14       12.24
  13-Jul-19 |        337        0.14       12.38
  14-Jul-19 |        337        0.14       12.52
  15-Jul-19 |        337        0.14       12.66
  16-Jul-19 |        337        0.14       12.80
  17-Jul-19 |        337        0.14       12.93
  18-Jul-19 |        337        0.14       13.07
  19-Jul-19 |        337        0.14       13.21
  20-Jul-19 |        337        0.14       13.35
  21-Jul-19 |        337        0.14       13.49
  22-Jul-19 |        337        0.14       13.63
  23-Jul-19 |        337        0.14       13.77
  24-Jul-19 |        337        0.14       13.91
  25-Jul-19 |        337        0.14       14.05
  26-Jul-19 |        337        0.14       14.19
  27-Jul-19 |        337        0.14       14.33
  28-Jul-19 |        337        0.14       14.46
  29-Jul-19 |        337        0.14       14.60
  30-Jul-19 |        337        0.14       14.74
  31-Jul-19 |        337        0.14       14.88
   1-Aug-19 |        337        0.14       15.02
   2-Aug-19 |        337        0.14       15.16
   3-Aug-19 |        337        0.14       15.30
   4-Aug-19 |        337        0.14       15.44
   5-Aug-19 |        337        0.14       15.58
   6-Aug-19 |        337        0.14       15.72
   7-Aug-19 |        337        0.14       15.86
   8-Aug-19 |        337        0.14       15.99
   9-Aug-19 |        337        0.14       16.13
  10-Aug-19 |        337        0.14       16.27
  11-Aug-19 |        337        0.14       16.41
  12-Aug-19 |        337        0.14       16.55
  13-Aug-19 |        337        0.14       16.69
  14-Aug-19 |        337        0.14       16.83
  15-Aug-19 |        337        0.14       16.97
  16-Aug-19 |        337        0.14       17.11
  17-Aug-19 |        337        0.14       17.25
  18-Aug-19 |        337        0.14       17.39
  19-Aug-19 |        337        0.14       17.52
  20-Aug-19 |        337        0.14       17.66
  21-Aug-19 |        337        0.14       17.80
  22-Aug-19 |        337        0.14       17.94
  23-Aug-19 |        337        0.14       18.08
  24-Aug-19 |        337        0.14       18.22
  25-Aug-19 |        337        0.14       18.36
  26-Aug-19 |        337        0.14       18.50
  27-Aug-19 |        337        0.14       18.64
  28-Aug-19 |        337        0.14       18.78
  29-Aug-19 |        337        0.14       18.92
  30-Aug-19 |        337        0.14       19.05
  31-Aug-19 |        337        0.14       19.19
   1-Sep-19 |        337        0.14       19.33
   2-Sep-19 |        337        0.14       19.47
   3-Sep-19 |        337        0.14       19.61
   4-Sep-19 |        337        0.14       19.75
   5-Sep-19 |        337        0.14       19.89
   6-Sep-19 |        337        0.14       20.03
   7-Sep-19 |        337        0.14       20.17
   8-Sep-19 |        337        0.14       20.31
   9-Sep-19 |        337        0.14       20.45
  10-Sep-19 |        337        0.14       20.58
  11-Sep-19 |        337        0.14       20.72
  12-Sep-19 |        337        0.14       20.86
  13-Sep-19 |        337        0.14       21.00
  14-Sep-19 |        337        0.14       21.14
  15-Sep-19 |        337        0.14       21.28
  16-Sep-19 |        337        0.14       21.42
  17-Sep-19 |        337        0.14       21.56
  18-Sep-19 |        337        0.14       21.70
  19-Sep-19 |        337        0.14       21.84
  20-Sep-19 |        337        0.14       21.97
  21-Sep-19 |        337        0.14       22.11
  22-Sep-19 |        337        0.14       22.25
  23-Sep-19 |        337        0.14       22.39
  24-Sep-19 |        337        0.14       22.53
  25-Sep-19 |        337        0.14       22.67
  26-Sep-19 |        337        0.14       22.81
  27-Sep-19 |        337        0.14       22.95
  28-Sep-19 |        337        0.14       23.09
  29-Sep-19 |        337        0.14       23.23
  30-Sep-19 |        337        0.14       23.37
   1-Oct-19 |        337        0.14       23.50
   2-Oct-19 |        337        0.14       23.64
   3-Oct-19 |        337        0.14       23.78
   4-Oct-19 |        337        0.14       23.92
   5-Oct-19 |        337        0.14       24.06
   6-Oct-19 |        337        0.14       24.20
   7-Oct-19 |        337        0.14       24.34
   8-Oct-19 |        337        0.14       24.48
   9-Oct-19 |        337        0.14       24.62
  10-Oct-19 |        337        0.14       24.76
  11-Oct-19 |        337        0.14       24.90
  12-Oct-19 |        337        0.14       25.03
  13-Oct-19 |        337        0.14       25.17
  14-Oct-19 |        337        0.14       25.31
  15-Oct-19 |        337        0.14       25.45
  16-Oct-19 |        337        0.14       25.59
  17-Oct-19 |        337        0.14       25.73
  18-Oct-19 |        337        0.14       25.87
  19-Oct-19 |        337        0.14       26.01
  20-Oct-19 |        337        0.14       26.15
  21-Oct-19 |        337        0.14       26.29
  22-Oct-19 |        337        0.14       26.43
  23-Oct-19 |        337        0.14       26.56
  24-Oct-19 |        337        0.14       26.70
  25-Oct-19 |        337        0.14       26.84
  26-Oct-19 |        337        0.14       26.98
  27-Oct-19 |        337        0.14       27.12
  28-Oct-19 |        337        0.14       27.26
  29-Oct-19 |        337        0.14       27.40
  30-Oct-19 |        337        0.14       27.54
  31-Oct-19 |        337        0.14       27.68
   1-Nov-19 |        337        0.14       27.82
   2-Nov-19 |        337        0.14       27.96
   3-Nov-19 |        337        0.14       28.09
   4-Nov-19 |        337        0.14       28.23
   5-Nov-19 |        337        0.14       28.37
   6-Nov-19 |        337        0.14       28.51
   7-Nov-19 |        337        0.14       28.65
   8-Nov-19 |        337        0.14       28.79
   9-Nov-19 |        337        0.14       28.93
  10-Nov-19 |        337        0.14       29.07
  11-Nov-19 |        337        0.14       29.21
  12-Nov-19 |        337        0.14       29.35
  13-Nov-19 |        337        0.14       29.49
  14-Nov-19 |        337        0.14       29.62
  15-Nov-19 |        337        0.14       29.76
  16-Nov-19 |        337        0.14       29.90
  17-Nov-19 |        337        0.14       30.04
  18-Nov-19 |        337        0.14       30.18
  19-Nov-19 |        337        0.14       30.32
  20-Nov-19 |        337        0.14       30.46
  21-Nov-19 |        337        0.14       30.60
  22-Nov-19 |        337        0.14       30.74
  23-Nov-19 |        337        0.14       30.88
  24-Nov-19 |        337        0.14       31.02
  25-Nov-19 |        337        0.14       31.15
  26-Nov-19 |        337        0.14       31.29
  27-Nov-19 |        337        0.14       31.43
  28-Nov-19 |        337        0.14       31.57
  29-Nov-19 |        337        0.14       31.71
  30-Nov-19 |        337        0.14       31.85
   1-Dec-19 |        337        0.14       31.99
   2-Dec-19 |        337        0.14       32.13
   3-Dec-19 |        337        0.14       32.27
   4-Dec-19 |        337        0.14       32.41
   5-Dec-19 |        337        0.14       32.55
   6-Dec-19 |        337        0.14       32.68
   7-Dec-19 |        337        0.14       32.82
   8-Dec-19 |        337        0.14       32.96
   9-Dec-19 |        337        0.14       33.10
  10-Dec-19 |        337        0.14       33.24
  11-Dec-19 |        337        0.14       33.38
  12-Dec-19 |        337        0.14       33.52
  13-Dec-19 |        337        0.14       33.66
  14-Dec-19 |        337        0.14       33.80
  15-Dec-19 |        337        0.14       33.94
  16-Dec-19 |        337        0.14       34.08
  17-Dec-19 |        337        0.14       34.21
  18-Dec-19 |        337        0.14       34.35
  19-Dec-19 |        337        0.14       34.49
  20-Dec-19 |        337        0.14       34.63
  21-Dec-19 |        337        0.14       34.77
  22-Dec-19 |        337        0.14       34.91
  23-Dec-19 |        337        0.14       35.05
  24-Dec-19 |        337        0.14       35.19
  25-Dec-19 |        337        0.14       35.33
  26-Dec-19 |        337        0.14       35.47
  27-Dec-19 |        337        0.14       35.61
  28-Dec-19 |        337        0.14       35.74
  29-Dec-19 |        337        0.14       35.88
  30-Dec-19 |        337        0.14       36.02
  31-Dec-19 |        337        0.14       36.16
   1-Jan-20 |        337        0.14       36.30
   2-Jan-20 |        337        0.14       36.44
   3-Jan-20 |        337        0.14       36.58
   4-Jan-20 |        337        0.14       36.72
   5-Jan-20 |        337        0.14       36.86
   6-Jan-20 |        337        0.14       37.00
   7-Jan-20 |        337        0.14       37.13
   8-Jan-20 |        337        0.14       37.27
   9-Jan-20 |        337        0.14       37.41
  10-Jan-20 |        337        0.14       37.55
  11-Jan-20 |        337        0.14       37.69
  12-Jan-20 |        337        0.14       37.83
  13-Jan-20 |        337        0.14       37.97
  14-Jan-20 |        337        0.14       38.11
  15-Jan-20 |        337        0.14       38.25
  16-Jan-20 |        337        0.14       38.39
  17-Jan-20 |        337        0.14       38.53
  18-Jan-20 |        337        0.14       38.66
  19-Jan-20 |        337        0.14       38.80
  20-Jan-20 |        337        0.14       38.94
  21-Jan-20 |        337        0.14       39.08
  22-Jan-20 |        337        0.14       39.22
  23-Jan-20 |        337        0.14       39.36
  24-Jan-20 |        337        0.14       39.50
  25-Jan-20 |        337        0.14       39.64
  26-Jan-20 |        337        0.14       39.78
  27-Jan-20 |        337        0.14       39.92
  28-Jan-20 |        337        0.14       40.06
  29-Jan-20 |        337        0.14       40.19
  30-Jan-20 |        337        0.14       40.33
  31-Jan-20 |        337        0.14       40.47
   1-Feb-20 |        337        0.14       40.61
   2-Feb-20 |        337        0.14       40.75
   3-Feb-20 |        337        0.14       40.89
   4-Feb-20 |        337        0.14       41.03
   5-Feb-20 |        337        0.14       41.17
   6-Feb-20 |        337        0.14       41.31
   7-Feb-20 |        337        0.14       41.45
   8-Feb-20 |        337        0.14       41.59
   9-Feb-20 |        337        0.14       41.72
  10-Feb-20 |        337        0.14       41.86
  11-Feb-20 |        337        0.14       42.00
  12-Feb-20 |        337        0.14       42.14
  13-Feb-20 |        337        0.14       42.28
  14-Feb-20 |        337        0.14       42.42
  15-Feb-20 |        337        0.14       42.56
  16-Feb-20 |        337        0.14       42.70
  17-Feb-20 |        337        0.14       42.84
  18-Feb-20 |        337        0.14       42.98
  19-Feb-20 |        337        0.14       43.12
  20-Feb-20 |        337        0.14       43.25
  21-Feb-20 |        337        0.14       43.39
  22-Feb-20 |        337        0.14       43.53
  23-Feb-20 |        337        0.14       43.67
  24-Feb-20 |        337        0.14       43.81
  25-Feb-20 |        337        0.14       43.95
  26-Feb-20 |        337        0.14       44.09
  27-Feb-20 |        337        0.14       44.23
  28-Feb-20 |        337        0.14       44.37
  29-Feb-20 |        337        0.14       44.51
   1-Mar-20 |        337        0.14       44.65
   2-Mar-20 |        337        0.14       44.78
   3-Mar-20 |        337        0.14       44.92
   4-Mar-20 |        337        0.14       45.06
   5-Mar-20 |        337        0.14       45.20
   6-Mar-20 |        337        0.14       45.34
   7-Mar-20 |        337        0.14       45.48
   8-Mar-20 |        337        0.14       45.62
   9-Mar-20 |        337        0.14       45.76
  10-Mar-20 |        337        0.14       45.90
  11-Mar-20 |        337        0.14       46.04
  12-Mar-20 |        337        0.14       46.18
  13-Mar-20 |        337        0.14       46.31
  14-Mar-20 |        337        0.14       46.45
  15-Mar-20 |        337        0.14       46.59
  16-Mar-20 |        337        0.14       46.73
  17-Mar-20 |        337        0.14       46.87
  18-Mar-20 |        337        0.14       47.01
  19-Mar-20 |        337        0.14       47.15
  20-Mar-20 |        337        0.14       47.29
  21-Mar-20 |        337        0.14       47.43
  22-Mar-20 |        337        0.14       47.57
  23-Mar-20 |        337        0.14       47.71
  24-Mar-20 |        337        0.14       47.84
  25-Mar-20 |        337        0.14       47.98
  26-Mar-20 |        337        0.14       48.12
  27-Mar-20 |        337        0.14       48.26
  28-Mar-20 |        337        0.14       48.40
  29-Mar-20 |        337        0.14       48.54
  30-Mar-20 |        337        0.14       48.68
  31-Mar-20 |        337        0.14       48.82
   1-Apr-20 |        337        0.14       48.96
   2-Apr-20 |        337        0.14       49.10
   3-Apr-20 |        337        0.14       49.24
   4-Apr-20 |        337        0.14       49.37
   5-Apr-20 |        337        0.14       49.51
   6-Apr-20 |        337        0.14       49.65
   7-Apr-20 |        337        0.14       49.79
   8-Apr-20 |        337        0.14       49.93
   9-Apr-20 |        337        0.14       50.07
  10-Apr-20 |        337        0.14       50.21
  11-Apr-20 |        337        0.14       50.35
  12-Apr-20 |        337        0.14       50.49
  13-Apr-20 |        337        0.14       50.63
  14-Apr-20 |        337        0.14       50.76
  15-Apr-20 |        337        0.14       50.90
  16-Apr-20 |        337        0.14       51.04
  17-Apr-20 |        337        0.14       51.18
  18-Apr-20 |        337        0.14       51.32
  19-Apr-20 |        337        0.14       51.46
  20-Apr-20 |        337        0.14       51.60
  21-Apr-20 |        337        0.14       51.74
  22-Apr-20 |        337        0.14       51.88
  23-Apr-20 |        337        0.14       52.02
  24-Apr-20 |        337        0.14       52.16
  25-Apr-20 |        337        0.14       52.29
  26-Apr-20 |        337        0.14       52.43
  27-Apr-20 |        337        0.14       52.57
  28-Apr-20 |        337        0.14       52.71
  29-Apr-20 |        337        0.14       52.85
  30-Apr-20 |        337        0.14       52.99
   1-May-20 |        337        0.14       53.13
   2-May-20 |        337        0.14       53.27
   3-May-20 |        337        0.14       53.41
   4-May-20 |        337        0.14       53.55
   5-May-20 |        337        0.14       53.69
   6-May-20 |        337        0.14       53.82
   7-May-20 |        337        0.14       53.96
   8-May-20 |        337        0.14       54.10
   9-May-20 |        337        0.14       54.24
  10-May-20 |        337        0.14       54.38
  11-May-20 |        337        0.14       54.52
  12-May-20 |        337        0.14       54.66
  13-May-20 |        337        0.14       54.80
  14-May-20 |        337        0.14       54.94
  15-May-20 |        337        0.14       55.08
  16-May-20 |        337        0.14       55.22
  17-May-20 |        337        0.14       55.35
  18-May-20 |        337        0.14       55.49
  19-May-20 |        337        0.14       55.63
  20-May-20 |        337        0.14       55.77
  21-May-20 |        337        0.14       55.91
  22-May-20 |        337        0.14       56.05
  23-May-20 |        337        0.14       56.19
  24-May-20 |        337        0.14       56.33
  25-May-20 |        337        0.14       56.47
  26-May-20 |        337        0.14       56.61
  27-May-20 |        337        0.14       56.75
  28-May-20 |        337        0.14       56.88
  29-May-20 |        337        0.14       57.02
  30-May-20 |        337        0.14       57.16
  31-May-20 |        337        0.14       57.30
   1-Jun-20 |        337        0.14       57.44
   2-Jun-20 |        337        0.14       57.58
   3-Jun-20 |        337        0.14       57.72
   4-Jun-20 |        337        0.14       57.86
   5-Jun-20 |        337        0.14       58.00
   6-Jun-20 |        337        0.14       58.14
   7-Jun-20 |        337        0.14       58.28
   8-Jun-20 |        337        0.14       58.41
   9-Jun-20 |        337        0.14       58.55
  10-Jun-20 |        337        0.14       58.69
  11-Jun-20 |        337        0.14       58.83
  12-Jun-20 |        337        0.14       58.97
  13-Jun-20 |        337        0.14       59.11
  14-Jun-20 |        337        0.14       59.25
  15-Jun-20 |        337        0.14       59.39
  16-Jun-20 |        337        0.14       59.53
  17-Jun-20 |        337        0.14       59.67
  18-Jun-20 |        337        0.14       59.81
  19-Jun-20 |        337        0.14       59.94
  20-Jun-20 |        337        0.14       60.08
  21-Jun-20 |        337        0.14       60.22
  22-Jun-20 |        337        0.14       60.36
  23-Jun-20 |        337        0.14       60.50
  24-Jun-20 |        337        0.14       60.64
  25-Jun-20 |        337        0.14       60.78
  26-Jun-20 |        337        0.14       60.92
  27-Jun-20 |        337        0.14       61.06
  28-Jun-20 |        337        0.14       61.20
  29-Jun-20 |        337        0.14       61.34
  30-Jun-20 |        337        0.14       61.47
   1-Jul-20 |        337        0.14       61.61
   2-Jul-20 |        337        0.14       61.75
   3-Jul-20 |        337        0.14       61.89
   4-Jul-20 |        337        0.14       62.03
   5-Jul-20 |        337        0.14       62.17
   6-Jul-20 |        337        0.14       62.31
   7-Jul-20 |        337        0.14       62.45
   8-Jul-20 |        337        0.14       62.59
   9-Jul-20 |        337        0.14       62.73
  10-Jul-20 |        337        0.14       62.87
  11-Jul-20 |        337        0.14       63.00
  12-Jul-20 |        337        0.14       63.14
  13-Jul-20 |        337        0.14       63.28
  14-Jul-20 |        337        0.14       63.42
  15-Jul-20 |        337        0.14       63.56
  16-Jul-20 |        337        0.14       63.70
  17-Jul-20 |        337        0.14       63.84
  18-Jul-20 |        337        0.14       63.98
  19-Jul-20 |        337        0.14       64.12
  20-Jul-20 |        337        0.14       64.26
  21-Jul-20 |        337        0.14       64.39
  22-Jul-20 |        337        0.14       64.53
  23-Jul-20 |        337        0.14       64.67
  24-Jul-20 |        337        0.14       64.81
  25-Jul-20 |        337        0.14       64.95
  26-Jul-20 |        337        0.14       65.09
  27-Jul-20 |        337        0.14       65.23
  28-Jul-20 |        337        0.14       65.37
  29-Jul-20 |        337        0.14       65.51
  30-Jul-20 |        337        0.14       65.65
  31-Jul-20 |        337        0.14       65.79
   1-Aug-20 |        337        0.14       65.92
   2-Aug-20 |        337        0.14       66.06
   3-Aug-20 |        337        0.14       66.20
   4-Aug-20 |        337        0.14       66.34
   5-Aug-20 |        337        0.14       66.48
   6-Aug-20 |        337        0.14       66.62
   7-Aug-20 |        337        0.14       66.76
   8-Aug-20 |        337        0.14       66.90
   9-Aug-20 |        337        0.14       67.04
  10-Aug-20 |        337        0.14       67.18
  11-Aug-20 |        337        0.14       67.32
  12-Aug-20 |        337        0.14       67.45
  13-Aug-20 |        337        0.14       67.59
  14-Aug-20 |        337        0.14       67.73
  15-Aug-20 |        337        0.14       67.87
  16-Aug-20 |        337        0.14       68.01
  17-Aug-20 |        337        0.14       68.15
  18-Aug-20 |        337        0.14       68.29
  19-Aug-20 |        337        0.14       68.43
  20-Aug-20 |        337        0.14       68.57
  21-Aug-20 |        337        0.14       68.71
  22-Aug-20 |        337        0.14       68.85
  23-Aug-20 |        337        0.14       68.98
  24-Aug-20 |        337        0.14       69.12
  25-Aug-20 |        337        0.14       69.26
  26-Aug-20 |        337        0.14       69.40
  27-Aug-20 |        337        0.14       69.54
  28-Aug-20 |        337        0.14       69.68
  29-Aug-20 |        337        0.14       69.82
  30-Aug-20 |        337        0.14       69.96
  31-Aug-20 |        337        0.14       70.10
   1-Sep-20 |        337        0.14       70.24
   2-Sep-20 |        337        0.14       70.38
   3-Sep-20 |        337        0.14       70.51
   4-Sep-20 |        337        0.14       70.65
   5-Sep-20 |        337        0.14       70.79
   6-Sep-20 |        337        0.14       70.93
   7-Sep-20 |        337        0.14       71.07
   8-Sep-20 |        337        0.14       71.21
   9-Sep-20 |        337        0.14       71.35
  10-Sep-20 |        337        0.14       71.49
  11-Sep-20 |        337        0.14       71.63
  12-Sep-20 |        337        0.14       71.77
  13-Sep-20 |        337        0.14       71.91
  14-Sep-20 |        337        0.14       72.04
  15-Sep-20 |        337        0.14       72.18
  16-Sep-20 |        337        0.14       72.32
  17-Sep-20 |        337        0.14       72.46
  18-Sep-20 |        337        0.14       72.60
  19-Sep-20 |        337        0.14       72.74
  20-Sep-20 |        337        0.14       72.88
  21-Sep-20 |        337        0.14       73.02
  22-Sep-20 |        337        0.14       73.16
  23-Sep-20 |        337        0.14       73.30
  24-Sep-20 |        337        0.14       73.44
  25-Sep-20 |        337        0.14       73.57
  26-Sep-20 |        337        0.14       73.71
  27-Sep-20 |        337        0.14       73.85
  28-Sep-20 |        337        0.14       73.99
  29-Sep-20 |        337        0.14       74.13
  30-Sep-20 |        337        0.14       74.27
   1-Oct-20 |        337        0.14       74.41
   2-Oct-20 |        337        0.14       74.55
   3-Oct-20 |        337        0.14       74.69
   4-Oct-20 |        337        0.14       74.83
   5-Oct-20 |        337        0.14       74.97
   6-Oct-20 |        337        0.14       75.10
   7-Oct-20 |        337        0.14       75.24
   8-Oct-20 |        337        0.14       75.38
   9-Oct-20 |        337        0.14       75.52
  10-Oct-20 |        337        0.14       75.66
  11-Oct-20 |        337        0.14       75.80
  12-Oct-20 |        337        0.14       75.94
  13-Oct-20 |        337        0.14       76.08
  14-Oct-20 |        337        0.14       76.22
  15-Oct-20 |        337        0.14       76.36
  16-Oct-20 |        337        0.14       76.50
  17-Oct-20 |        337        0.14       76.63
  18-Oct-20 |        337        0.14       76.77
  19-Oct-20 |        337        0.14       76.91
  20-Oct-20 |        337        0.14       77.05
  21-Oct-20 |        337        0.14       77.19
  22-Oct-20 |        337        0.14       77.33
  23-Oct-20 |        337        0.14       77.47
  24-Oct-20 |        337        0.14       77.61
  25-Oct-20 |        337        0.14       77.75
  26-Oct-20 |        337        0.14       77.89
  27-Oct-20 |        337        0.14       78.03
  28-Oct-20 |        337        0.14       78.16
  29-Oct-20 |        337        0.14       78.30
  30-Oct-20 |        337        0.14       78.44
  31-Oct-20 |        337        0.14       78.58
   1-Nov-20 |        337        0.14       78.72
   2-Nov-20 |        337        0.14       78.86
   3-Nov-20 |        337        0.14       79.00
   4-Nov-20 |        337        0.14       79.14
   5-Nov-20 |        337        0.14       79.28
   6-Nov-20 |        337        0.14       79.42
   7-Nov-20 |        337        0.14       79.55
   8-Nov-20 |        337        0.14       79.69
   9-Nov-20 |        337        0.14       79.83
  10-Nov-20 |        337        0.14       79.97
  11-Nov-20 |        337        0.14       80.11
  12-Nov-20 |        337        0.14       80.25
  13-Nov-20 |        337        0.14       80.39
  14-Nov-20 |        337        0.14       80.53
  15-Nov-20 |        337        0.14       80.67
  16-Nov-20 |        337        0.14       80.81
  17-Nov-20 |        337        0.14       80.95
  18-Nov-20 |        337        0.14       81.08
  19-Nov-20 |        337        0.14       81.22
  20-Nov-20 |        337        0.14       81.36
  21-Nov-20 |        337        0.14       81.50
  22-Nov-20 |        337        0.14       81.64
  23-Nov-20 |        337        0.14       81.78
  24-Nov-20 |        337        0.14       81.92
  25-Nov-20 |        337        0.14       82.06
  26-Nov-20 |        337        0.14       82.20
  27-Nov-20 |        337        0.14       82.34
  28-Nov-20 |        337        0.14       82.48
  29-Nov-20 |        337        0.14       82.61
  30-Nov-20 |        337        0.14       82.75
   1-Dec-20 |        337        0.14       82.89
   2-Dec-20 |        337        0.14       83.03
   3-Dec-20 |        337        0.14       83.17
   4-Dec-20 |        337        0.14       83.31
   5-Dec-20 |        337        0.14       83.45
   6-Dec-20 |        337        0.14       83.59
   7-Dec-20 |        337        0.14       83.73
   8-Dec-20 |        337        0.14       83.87
   9-Dec-20 |        337        0.14       84.01
  10-Dec-20 |        337        0.14       84.14
  11-Dec-20 |        337        0.14       84.28
  12-Dec-20 |        337        0.14       84.42
  13-Dec-20 |        337        0.14       84.56
  14-Dec-20 |        337        0.14       84.70
  15-Dec-20 |        337        0.14       84.84
  16-Dec-20 |        337        0.14       84.98
  17-Dec-20 |        337        0.14       85.12
  18-Dec-20 |        337        0.14       85.26
  19-Dec-20 |        337        0.14       85.40
  20-Dec-20 |        337        0.14       85.54
  21-Dec-20 |        337        0.14       85.67
  22-Dec-20 |        337        0.14       85.81
  23-Dec-20 |        337        0.14       85.95
  24-Dec-20 |        337        0.14       86.09
  25-Dec-20 |        337        0.14       86.23
  26-Dec-20 |        337        0.14       86.37
  27-Dec-20 |        337        0.14       86.51
  28-Dec-20 |        337        0.14       86.65
  29-Dec-20 |        337        0.14       86.79
  30-Dec-20 |        337        0.14       86.93
  31-Dec-20 |        337        0.14       87.07
   1-Jan-21 |        337        0.14       87.20
   2-Jan-21 |        337        0.14       87.34
   3-Jan-21 |        337        0.14       87.48
   4-Jan-21 |        337        0.14       87.62
   5-Jan-21 |        337        0.14       87.76
   6-Jan-21 |        337        0.14       87.90
   7-Jan-21 |        337        0.14       88.04
   8-Jan-21 |        337        0.14       88.18
   9-Jan-21 |        337        0.14       88.32
  10-Jan-21 |        337        0.14       88.46
  11-Jan-21 |        337        0.14       88.60
  12-Jan-21 |        337        0.14       88.73
  13-Jan-21 |        337        0.14       88.87
  14-Jan-21 |        337        0.14       89.01
  15-Jan-21 |        337        0.14       89.15
  16-Jan-21 |        337        0.14       89.29
  17-Jan-21 |        337        0.14       89.43
  18-Jan-21 |        337        0.14       89.57
  19-Jan-21 |        337        0.14       89.71
  20-Jan-21 |        337        0.14       89.85
  21-Jan-21 |        337        0.14       89.99
  22-Jan-21 |        337        0.14       90.13
  23-Jan-21 |        337        0.14       90.26
  24-Jan-21 |        337        0.14       90.40
  25-Jan-21 |        337        0.14       90.54
  26-Jan-21 |        337        0.14       90.68
  27-Jan-21 |        337        0.14       90.82
  28-Jan-21 |        337        0.14       90.96
  29-Jan-21 |        337        0.14       91.10
  30-Jan-21 |        337        0.14       91.24
  31-Jan-21 |        337        0.14       91.38
   1-Feb-21 |        337        0.14       91.52
   2-Feb-21 |        337        0.14       91.66
   3-Feb-21 |        337        0.14       91.79
   4-Feb-21 |        337        0.14       91.93
   5-Feb-21 |        337        0.14       92.07
   6-Feb-21 |        337        0.14       92.21
   7-Feb-21 |        337        0.14       92.35
   8-Feb-21 |        337        0.14       92.49
   9-Feb-21 |        337        0.14       92.63
  10-Feb-21 |        337        0.14       92.77
  11-Feb-21 |        337        0.14       92.91
  12-Feb-21 |        337        0.14       93.05
  13-Feb-21 |        337        0.14       93.18
  14-Feb-21 |        337        0.14       93.32
  15-Feb-21 |        337        0.14       93.46
  16-Feb-21 |        337        0.14       93.60
  17-Feb-21 |        337        0.14       93.74
  18-Feb-21 |        337        0.14       93.88
  19-Feb-21 |        337        0.14       94.02
  20-Feb-21 |        337        0.14       94.16
  21-Feb-21 |        337        0.14       94.30
  22-Feb-21 |        337        0.14       94.44
  23-Feb-21 |        337        0.14       94.58
  24-Feb-21 |        337        0.14       94.71
  25-Feb-21 |        337        0.14       94.85
  26-Feb-21 |        337        0.14       94.99
  27-Feb-21 |        337        0.14       95.13
  28-Feb-21 |        337        0.14       95.27
   1-Mar-21 |        337        0.14       95.41
   2-Mar-21 |        337        0.14       95.55
   3-Mar-21 |        337        0.14       95.69
   4-Mar-21 |        337        0.14       95.83
   5-Mar-21 |        337        0.14       95.97
   6-Mar-21 |        337        0.14       96.11
   7-Mar-21 |        337        0.14       96.24
   8-Mar-21 |        337        0.14       96.38
   9-Mar-21 |        337        0.14       96.52
  10-Mar-21 |        337        0.14       96.66
  11-Mar-21 |        337        0.14       96.80
  12-Mar-21 |        337        0.14       96.94
  13-Mar-21 |        337        0.14       97.08
  14-Mar-21 |        337        0.14       97.22
  15-Mar-21 |        337        0.14       97.36
  16-Mar-21 |        337        0.14       97.50
  17-Mar-21 |        337        0.14       97.64
  18-Mar-21 |        337        0.14       97.77
  19-Mar-21 |        337        0.14       97.91
  20-Mar-21 |        337        0.14       98.05
  21-Mar-21 |        337        0.14       98.19
  22-Mar-21 |        337        0.14       98.33
  23-Mar-21 |        337        0.14       98.47
  24-Mar-21 |        337        0.14       98.61
  25-Mar-21 |        337        0.14       98.75
  26-Mar-21 |        337        0.14       98.89
  27-Mar-21 |        337        0.14       99.03
  28-Mar-21 |        337        0.14       99.17
  29-Mar-21 |        337        0.14       99.30
  30-Mar-21 |        337        0.14       99.44
  31-Mar-21 |        337        0.14       99.58
   1-Apr-21 |        337        0.14       99.72
   2-Apr-21 |        337        0.14       99.86
   3-Apr-21 |        337        0.14      100.00
------------+-----------------------------------
      Total |    242,303      100.00

. ** 242,303 Observations. 337 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ** Generate a week variable
. drop week

. gen int week = floor((date-td(31dec2018))/7)+1

. la var week "Week"

. 
. ** Generate a month variable which goes from the 16th of each month to the 15th of the next month. 
. ** This definition of month aligns with the implementation of ETS market in its initial Stages. 
. ** Nick Cox's code:
. drop month16

. gen month16 = date if day(date) == 16
(234,215 missing values generated)

. //      replace month16 = mdy(1, 16, 2019) in 1
. replace month16 = month16[_n-1] if missing(month16)
(234,215 real changes made)

. la var month16 "Month, defined as 16th of this month to 15th of next month"

. gen month16_sif = month16

. format month16 %tddd-Mon-YY

. la var month16_sif "[SIF] Month-year. For convenience."

. order month16_sif, a(month16)

. sort composite_id date

. ** Check days in each month for one device. Looks good.
. *tab month16 if composite_id == "GJSRT100740111"
. 
. ** Generate Dummy for Interregnum period of market 
. ** Covid lockdown -- 23 March 2020 to 11 October 2021. 
. ** Mock-III started on 12 October 2021.
. gen D_interregnum_week = week >= 65 & week <= 93

. replace D_interregnum_week =1 if week == 99 | week == 100
(4,718 real changes made)

. la var D_interregnum_week ///
>         "[Week-level] =1 if Interregnum due to Covid-19 lockdown, zero otherwise."

. 
. drop extinct_with_assignment removed_from_sample comment

. 
. ** Remove plants that have no observation from 16-Apr-19 to 03-Apr-21.
. bysort gpcb_id: egen pct_report = mean(!missing(pm_mass_rule0)) if ///
>         month16 >= date("2019jul16", "YMD") & D_interregnum_week == 0
(103,796 missing values generated)

. sort composite_id date

. bysort gpcb_id: egen pct_report_1 = mean(pct_report)

. drop if pct_report_1 == 0
(19,413 observations deleted)

. drop pct_report pct_report_1

. sort composite_id date  

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        310        0.14        0.14
  17-Apr-19 |        310        0.14        0.28
  18-Apr-19 |        310        0.14        0.42
  19-Apr-19 |        310        0.14        0.56
  20-Apr-19 |        310        0.14        0.70
  21-Apr-19 |        310        0.14        0.83
  22-Apr-19 |        310        0.14        0.97
  23-Apr-19 |        310        0.14        1.11
  24-Apr-19 |        310        0.14        1.25
  25-Apr-19 |        310        0.14        1.39
  26-Apr-19 |        310        0.14        1.53
  27-Apr-19 |        310        0.14        1.67
  28-Apr-19 |        310        0.14        1.81
  29-Apr-19 |        310        0.14        1.95
  30-Apr-19 |        310        0.14        2.09
   1-May-19 |        310        0.14        2.23
   2-May-19 |        310        0.14        2.36
   3-May-19 |        310        0.14        2.50
   4-May-19 |        310        0.14        2.64
   5-May-19 |        310        0.14        2.78
   6-May-19 |        310        0.14        2.92
   7-May-19 |        310        0.14        3.06
   8-May-19 |        310        0.14        3.20
   9-May-19 |        310        0.14        3.34
  10-May-19 |        310        0.14        3.48
  11-May-19 |        310        0.14        3.62
  12-May-19 |        310        0.14        3.76
  13-May-19 |        310        0.14        3.89
  14-May-19 |        310        0.14        4.03
  15-May-19 |        310        0.14        4.17
  16-May-19 |        310        0.14        4.31
  17-May-19 |        310        0.14        4.45
  18-May-19 |        310        0.14        4.59
  19-May-19 |        310        0.14        4.73
  20-May-19 |        310        0.14        4.87
  21-May-19 |        310        0.14        5.01
  22-May-19 |        310        0.14        5.15
  23-May-19 |        310        0.14        5.29
  24-May-19 |        310        0.14        5.42
  25-May-19 |        310        0.14        5.56
  26-May-19 |        310        0.14        5.70
  27-May-19 |        310        0.14        5.84
  28-May-19 |        310        0.14        5.98
  29-May-19 |        310        0.14        6.12
  30-May-19 |        310        0.14        6.26
  31-May-19 |        310        0.14        6.40
   1-Jun-19 |        310        0.14        6.54
   2-Jun-19 |        310        0.14        6.68
   3-Jun-19 |        310        0.14        6.82
   4-Jun-19 |        310        0.14        6.95
   5-Jun-19 |        310        0.14        7.09
   6-Jun-19 |        310        0.14        7.23
   7-Jun-19 |        310        0.14        7.37
   8-Jun-19 |        310        0.14        7.51
   9-Jun-19 |        310        0.14        7.65
  10-Jun-19 |        310        0.14        7.79
  11-Jun-19 |        310        0.14        7.93
  12-Jun-19 |        310        0.14        8.07
  13-Jun-19 |        310        0.14        8.21
  14-Jun-19 |        310        0.14        8.34
  15-Jun-19 |        310        0.14        8.48
  16-Jun-19 |        310        0.14        8.62
  17-Jun-19 |        310        0.14        8.76
  18-Jun-19 |        310        0.14        8.90
  19-Jun-19 |        310        0.14        9.04
  20-Jun-19 |        310        0.14        9.18
  21-Jun-19 |        310        0.14        9.32
  22-Jun-19 |        310        0.14        9.46
  23-Jun-19 |        310        0.14        9.60
  24-Jun-19 |        310        0.14        9.74
  25-Jun-19 |        310        0.14        9.87
  26-Jun-19 |        310        0.14       10.01
  27-Jun-19 |        310        0.14       10.15
  28-Jun-19 |        310        0.14       10.29
  29-Jun-19 |        310        0.14       10.43
  30-Jun-19 |        310        0.14       10.57
   1-Jul-19 |        310        0.14       10.71
   2-Jul-19 |        310        0.14       10.85
   3-Jul-19 |        310        0.14       10.99
   4-Jul-19 |        310        0.14       11.13
   5-Jul-19 |        310        0.14       11.27
   6-Jul-19 |        310        0.14       11.40
   7-Jul-19 |        310        0.14       11.54
   8-Jul-19 |        310        0.14       11.68
   9-Jul-19 |        310        0.14       11.82
  10-Jul-19 |        310        0.14       11.96
  11-Jul-19 |        310        0.14       12.10
  12-Jul-19 |        310        0.14       12.24
  13-Jul-19 |        310        0.14       12.38
  14-Jul-19 |        310        0.14       12.52
  15-Jul-19 |        310        0.14       12.66
  16-Jul-19 |        310        0.14       12.80
  17-Jul-19 |        310        0.14       12.93
  18-Jul-19 |        310        0.14       13.07
  19-Jul-19 |        310        0.14       13.21
  20-Jul-19 |        310        0.14       13.35
  21-Jul-19 |        310        0.14       13.49
  22-Jul-19 |        310        0.14       13.63
  23-Jul-19 |        310        0.14       13.77
  24-Jul-19 |        310        0.14       13.91
  25-Jul-19 |        310        0.14       14.05
  26-Jul-19 |        310        0.14       14.19
  27-Jul-19 |        310        0.14       14.33
  28-Jul-19 |        310        0.14       14.46
  29-Jul-19 |        310        0.14       14.60
  30-Jul-19 |        310        0.14       14.74
  31-Jul-19 |        310        0.14       14.88
   1-Aug-19 |        310        0.14       15.02
   2-Aug-19 |        310        0.14       15.16
   3-Aug-19 |        310        0.14       15.30
   4-Aug-19 |        310        0.14       15.44
   5-Aug-19 |        310        0.14       15.58
   6-Aug-19 |        310        0.14       15.72
   7-Aug-19 |        310        0.14       15.86
   8-Aug-19 |        310        0.14       15.99
   9-Aug-19 |        310        0.14       16.13
  10-Aug-19 |        310        0.14       16.27
  11-Aug-19 |        310        0.14       16.41
  12-Aug-19 |        310        0.14       16.55
  13-Aug-19 |        310        0.14       16.69
  14-Aug-19 |        310        0.14       16.83
  15-Aug-19 |        310        0.14       16.97
  16-Aug-19 |        310        0.14       17.11
  17-Aug-19 |        310        0.14       17.25
  18-Aug-19 |        310        0.14       17.39
  19-Aug-19 |        310        0.14       17.52
  20-Aug-19 |        310        0.14       17.66
  21-Aug-19 |        310        0.14       17.80
  22-Aug-19 |        310        0.14       17.94
  23-Aug-19 |        310        0.14       18.08
  24-Aug-19 |        310        0.14       18.22
  25-Aug-19 |        310        0.14       18.36
  26-Aug-19 |        310        0.14       18.50
  27-Aug-19 |        310        0.14       18.64
  28-Aug-19 |        310        0.14       18.78
  29-Aug-19 |        310        0.14       18.92
  30-Aug-19 |        310        0.14       19.05
  31-Aug-19 |        310        0.14       19.19
   1-Sep-19 |        310        0.14       19.33
   2-Sep-19 |        310        0.14       19.47
   3-Sep-19 |        310        0.14       19.61
   4-Sep-19 |        310        0.14       19.75
   5-Sep-19 |        310        0.14       19.89
   6-Sep-19 |        310        0.14       20.03
   7-Sep-19 |        310        0.14       20.17
   8-Sep-19 |        310        0.14       20.31
   9-Sep-19 |        310        0.14       20.45
  10-Sep-19 |        310        0.14       20.58
  11-Sep-19 |        310        0.14       20.72
  12-Sep-19 |        310        0.14       20.86
  13-Sep-19 |        310        0.14       21.00
  14-Sep-19 |        310        0.14       21.14
  15-Sep-19 |        310        0.14       21.28
  16-Sep-19 |        310        0.14       21.42
  17-Sep-19 |        310        0.14       21.56
  18-Sep-19 |        310        0.14       21.70
  19-Sep-19 |        310        0.14       21.84
  20-Sep-19 |        310        0.14       21.97
  21-Sep-19 |        310        0.14       22.11
  22-Sep-19 |        310        0.14       22.25
  23-Sep-19 |        310        0.14       22.39
  24-Sep-19 |        310        0.14       22.53
  25-Sep-19 |        310        0.14       22.67
  26-Sep-19 |        310        0.14       22.81
  27-Sep-19 |        310        0.14       22.95
  28-Sep-19 |        310        0.14       23.09
  29-Sep-19 |        310        0.14       23.23
  30-Sep-19 |        310        0.14       23.37
   1-Oct-19 |        310        0.14       23.50
   2-Oct-19 |        310        0.14       23.64
   3-Oct-19 |        310        0.14       23.78
   4-Oct-19 |        310        0.14       23.92
   5-Oct-19 |        310        0.14       24.06
   6-Oct-19 |        310        0.14       24.20
   7-Oct-19 |        310        0.14       24.34
   8-Oct-19 |        310        0.14       24.48
   9-Oct-19 |        310        0.14       24.62
  10-Oct-19 |        310        0.14       24.76
  11-Oct-19 |        310        0.14       24.90
  12-Oct-19 |        310        0.14       25.03
  13-Oct-19 |        310        0.14       25.17
  14-Oct-19 |        310        0.14       25.31
  15-Oct-19 |        310        0.14       25.45
  16-Oct-19 |        310        0.14       25.59
  17-Oct-19 |        310        0.14       25.73
  18-Oct-19 |        310        0.14       25.87
  19-Oct-19 |        310        0.14       26.01
  20-Oct-19 |        310        0.14       26.15
  21-Oct-19 |        310        0.14       26.29
  22-Oct-19 |        310        0.14       26.43
  23-Oct-19 |        310        0.14       26.56
  24-Oct-19 |        310        0.14       26.70
  25-Oct-19 |        310        0.14       26.84
  26-Oct-19 |        310        0.14       26.98
  27-Oct-19 |        310        0.14       27.12
  28-Oct-19 |        310        0.14       27.26
  29-Oct-19 |        310        0.14       27.40
  30-Oct-19 |        310        0.14       27.54
  31-Oct-19 |        310        0.14       27.68
   1-Nov-19 |        310        0.14       27.82
   2-Nov-19 |        310        0.14       27.96
   3-Nov-19 |        310        0.14       28.09
   4-Nov-19 |        310        0.14       28.23
   5-Nov-19 |        310        0.14       28.37
   6-Nov-19 |        310        0.14       28.51
   7-Nov-19 |        310        0.14       28.65
   8-Nov-19 |        310        0.14       28.79
   9-Nov-19 |        310        0.14       28.93
  10-Nov-19 |        310        0.14       29.07
  11-Nov-19 |        310        0.14       29.21
  12-Nov-19 |        310        0.14       29.35
  13-Nov-19 |        310        0.14       29.49
  14-Nov-19 |        310        0.14       29.62
  15-Nov-19 |        310        0.14       29.76
  16-Nov-19 |        310        0.14       29.90
  17-Nov-19 |        310        0.14       30.04
  18-Nov-19 |        310        0.14       30.18
  19-Nov-19 |        310        0.14       30.32
  20-Nov-19 |        310        0.14       30.46
  21-Nov-19 |        310        0.14       30.60
  22-Nov-19 |        310        0.14       30.74
  23-Nov-19 |        310        0.14       30.88
  24-Nov-19 |        310        0.14       31.02
  25-Nov-19 |        310        0.14       31.15
  26-Nov-19 |        310        0.14       31.29
  27-Nov-19 |        310        0.14       31.43
  28-Nov-19 |        310        0.14       31.57
  29-Nov-19 |        310        0.14       31.71
  30-Nov-19 |        310        0.14       31.85
   1-Dec-19 |        310        0.14       31.99
   2-Dec-19 |        310        0.14       32.13
   3-Dec-19 |        310        0.14       32.27
   4-Dec-19 |        310        0.14       32.41
   5-Dec-19 |        310        0.14       32.55
   6-Dec-19 |        310        0.14       32.68
   7-Dec-19 |        310        0.14       32.82
   8-Dec-19 |        310        0.14       32.96
   9-Dec-19 |        310        0.14       33.10
  10-Dec-19 |        310        0.14       33.24
  11-Dec-19 |        310        0.14       33.38
  12-Dec-19 |        310        0.14       33.52
  13-Dec-19 |        310        0.14       33.66
  14-Dec-19 |        310        0.14       33.80
  15-Dec-19 |        310        0.14       33.94
  16-Dec-19 |        310        0.14       34.08
  17-Dec-19 |        310        0.14       34.21
  18-Dec-19 |        310        0.14       34.35
  19-Dec-19 |        310        0.14       34.49
  20-Dec-19 |        310        0.14       34.63
  21-Dec-19 |        310        0.14       34.77
  22-Dec-19 |        310        0.14       34.91
  23-Dec-19 |        310        0.14       35.05
  24-Dec-19 |        310        0.14       35.19
  25-Dec-19 |        310        0.14       35.33
  26-Dec-19 |        310        0.14       35.47
  27-Dec-19 |        310        0.14       35.61
  28-Dec-19 |        310        0.14       35.74
  29-Dec-19 |        310        0.14       35.88
  30-Dec-19 |        310        0.14       36.02
  31-Dec-19 |        310        0.14       36.16
   1-Jan-20 |        310        0.14       36.30
   2-Jan-20 |        310        0.14       36.44
   3-Jan-20 |        310        0.14       36.58
   4-Jan-20 |        310        0.14       36.72
   5-Jan-20 |        310        0.14       36.86
   6-Jan-20 |        310        0.14       37.00
   7-Jan-20 |        310        0.14       37.13
   8-Jan-20 |        310        0.14       37.27
   9-Jan-20 |        310        0.14       37.41
  10-Jan-20 |        310        0.14       37.55
  11-Jan-20 |        310        0.14       37.69
  12-Jan-20 |        310        0.14       37.83
  13-Jan-20 |        310        0.14       37.97
  14-Jan-20 |        310        0.14       38.11
  15-Jan-20 |        310        0.14       38.25
  16-Jan-20 |        310        0.14       38.39
  17-Jan-20 |        310        0.14       38.53
  18-Jan-20 |        310        0.14       38.66
  19-Jan-20 |        310        0.14       38.80
  20-Jan-20 |        310        0.14       38.94
  21-Jan-20 |        310        0.14       39.08
  22-Jan-20 |        310        0.14       39.22
  23-Jan-20 |        310        0.14       39.36
  24-Jan-20 |        310        0.14       39.50
  25-Jan-20 |        310        0.14       39.64
  26-Jan-20 |        310        0.14       39.78
  27-Jan-20 |        310        0.14       39.92
  28-Jan-20 |        310        0.14       40.06
  29-Jan-20 |        310        0.14       40.19
  30-Jan-20 |        310        0.14       40.33
  31-Jan-20 |        310        0.14       40.47
   1-Feb-20 |        310        0.14       40.61
   2-Feb-20 |        310        0.14       40.75
   3-Feb-20 |        310        0.14       40.89
   4-Feb-20 |        310        0.14       41.03
   5-Feb-20 |        310        0.14       41.17
   6-Feb-20 |        310        0.14       41.31
   7-Feb-20 |        310        0.14       41.45
   8-Feb-20 |        310        0.14       41.59
   9-Feb-20 |        310        0.14       41.72
  10-Feb-20 |        310        0.14       41.86
  11-Feb-20 |        310        0.14       42.00
  12-Feb-20 |        310        0.14       42.14
  13-Feb-20 |        310        0.14       42.28
  14-Feb-20 |        310        0.14       42.42
  15-Feb-20 |        310        0.14       42.56
  16-Feb-20 |        310        0.14       42.70
  17-Feb-20 |        310        0.14       42.84
  18-Feb-20 |        310        0.14       42.98
  19-Feb-20 |        310        0.14       43.12
  20-Feb-20 |        310        0.14       43.25
  21-Feb-20 |        310        0.14       43.39
  22-Feb-20 |        310        0.14       43.53
  23-Feb-20 |        310        0.14       43.67
  24-Feb-20 |        310        0.14       43.81
  25-Feb-20 |        310        0.14       43.95
  26-Feb-20 |        310        0.14       44.09
  27-Feb-20 |        310        0.14       44.23
  28-Feb-20 |        310        0.14       44.37
  29-Feb-20 |        310        0.14       44.51
   1-Mar-20 |        310        0.14       44.65
   2-Mar-20 |        310        0.14       44.78
   3-Mar-20 |        310        0.14       44.92
   4-Mar-20 |        310        0.14       45.06
   5-Mar-20 |        310        0.14       45.20
   6-Mar-20 |        310        0.14       45.34
   7-Mar-20 |        310        0.14       45.48
   8-Mar-20 |        310        0.14       45.62
   9-Mar-20 |        310        0.14       45.76
  10-Mar-20 |        310        0.14       45.90
  11-Mar-20 |        310        0.14       46.04
  12-Mar-20 |        310        0.14       46.18
  13-Mar-20 |        310        0.14       46.31
  14-Mar-20 |        310        0.14       46.45
  15-Mar-20 |        310        0.14       46.59
  16-Mar-20 |        310        0.14       46.73
  17-Mar-20 |        310        0.14       46.87
  18-Mar-20 |        310        0.14       47.01
  19-Mar-20 |        310        0.14       47.15
  20-Mar-20 |        310        0.14       47.29
  21-Mar-20 |        310        0.14       47.43
  22-Mar-20 |        310        0.14       47.57
  23-Mar-20 |        310        0.14       47.71
  24-Mar-20 |        310        0.14       47.84
  25-Mar-20 |        310        0.14       47.98
  26-Mar-20 |        310        0.14       48.12
  27-Mar-20 |        310        0.14       48.26
  28-Mar-20 |        310        0.14       48.40
  29-Mar-20 |        310        0.14       48.54
  30-Mar-20 |        310        0.14       48.68
  31-Mar-20 |        310        0.14       48.82
   1-Apr-20 |        310        0.14       48.96
   2-Apr-20 |        310        0.14       49.10
   3-Apr-20 |        310        0.14       49.24
   4-Apr-20 |        310        0.14       49.37
   5-Apr-20 |        310        0.14       49.51
   6-Apr-20 |        310        0.14       49.65
   7-Apr-20 |        310        0.14       49.79
   8-Apr-20 |        310        0.14       49.93
   9-Apr-20 |        310        0.14       50.07
  10-Apr-20 |        310        0.14       50.21
  11-Apr-20 |        310        0.14       50.35
  12-Apr-20 |        310        0.14       50.49
  13-Apr-20 |        310        0.14       50.63
  14-Apr-20 |        310        0.14       50.76
  15-Apr-20 |        310        0.14       50.90
  16-Apr-20 |        310        0.14       51.04
  17-Apr-20 |        310        0.14       51.18
  18-Apr-20 |        310        0.14       51.32
  19-Apr-20 |        310        0.14       51.46
  20-Apr-20 |        310        0.14       51.60
  21-Apr-20 |        310        0.14       51.74
  22-Apr-20 |        310        0.14       51.88
  23-Apr-20 |        310        0.14       52.02
  24-Apr-20 |        310        0.14       52.16
  25-Apr-20 |        310        0.14       52.29
  26-Apr-20 |        310        0.14       52.43
  27-Apr-20 |        310        0.14       52.57
  28-Apr-20 |        310        0.14       52.71
  29-Apr-20 |        310        0.14       52.85
  30-Apr-20 |        310        0.14       52.99
   1-May-20 |        310        0.14       53.13
   2-May-20 |        310        0.14       53.27
   3-May-20 |        310        0.14       53.41
   4-May-20 |        310        0.14       53.55
   5-May-20 |        310        0.14       53.69
   6-May-20 |        310        0.14       53.82
   7-May-20 |        310        0.14       53.96
   8-May-20 |        310        0.14       54.10
   9-May-20 |        310        0.14       54.24
  10-May-20 |        310        0.14       54.38
  11-May-20 |        310        0.14       54.52
  12-May-20 |        310        0.14       54.66
  13-May-20 |        310        0.14       54.80
  14-May-20 |        310        0.14       54.94
  15-May-20 |        310        0.14       55.08
  16-May-20 |        310        0.14       55.22
  17-May-20 |        310        0.14       55.35
  18-May-20 |        310        0.14       55.49
  19-May-20 |        310        0.14       55.63
  20-May-20 |        310        0.14       55.77
  21-May-20 |        310        0.14       55.91
  22-May-20 |        310        0.14       56.05
  23-May-20 |        310        0.14       56.19
  24-May-20 |        310        0.14       56.33
  25-May-20 |        310        0.14       56.47
  26-May-20 |        310        0.14       56.61
  27-May-20 |        310        0.14       56.75
  28-May-20 |        310        0.14       56.88
  29-May-20 |        310        0.14       57.02
  30-May-20 |        310        0.14       57.16
  31-May-20 |        310        0.14       57.30
   1-Jun-20 |        310        0.14       57.44
   2-Jun-20 |        310        0.14       57.58
   3-Jun-20 |        310        0.14       57.72
   4-Jun-20 |        310        0.14       57.86
   5-Jun-20 |        310        0.14       58.00
   6-Jun-20 |        310        0.14       58.14
   7-Jun-20 |        310        0.14       58.28
   8-Jun-20 |        310        0.14       58.41
   9-Jun-20 |        310        0.14       58.55
  10-Jun-20 |        310        0.14       58.69
  11-Jun-20 |        310        0.14       58.83
  12-Jun-20 |        310        0.14       58.97
  13-Jun-20 |        310        0.14       59.11
  14-Jun-20 |        310        0.14       59.25
  15-Jun-20 |        310        0.14       59.39
  16-Jun-20 |        310        0.14       59.53
  17-Jun-20 |        310        0.14       59.67
  18-Jun-20 |        310        0.14       59.81
  19-Jun-20 |        310        0.14       59.94
  20-Jun-20 |        310        0.14       60.08
  21-Jun-20 |        310        0.14       60.22
  22-Jun-20 |        310        0.14       60.36
  23-Jun-20 |        310        0.14       60.50
  24-Jun-20 |        310        0.14       60.64
  25-Jun-20 |        310        0.14       60.78
  26-Jun-20 |        310        0.14       60.92
  27-Jun-20 |        310        0.14       61.06
  28-Jun-20 |        310        0.14       61.20
  29-Jun-20 |        310        0.14       61.34
  30-Jun-20 |        310        0.14       61.47
   1-Jul-20 |        310        0.14       61.61
   2-Jul-20 |        310        0.14       61.75
   3-Jul-20 |        310        0.14       61.89
   4-Jul-20 |        310        0.14       62.03
   5-Jul-20 |        310        0.14       62.17
   6-Jul-20 |        310        0.14       62.31
   7-Jul-20 |        310        0.14       62.45
   8-Jul-20 |        310        0.14       62.59
   9-Jul-20 |        310        0.14       62.73
  10-Jul-20 |        310        0.14       62.87
  11-Jul-20 |        310        0.14       63.00
  12-Jul-20 |        310        0.14       63.14
  13-Jul-20 |        310        0.14       63.28
  14-Jul-20 |        310        0.14       63.42
  15-Jul-20 |        310        0.14       63.56
  16-Jul-20 |        310        0.14       63.70
  17-Jul-20 |        310        0.14       63.84
  18-Jul-20 |        310        0.14       63.98
  19-Jul-20 |        310        0.14       64.12
  20-Jul-20 |        310        0.14       64.26
  21-Jul-20 |        310        0.14       64.39
  22-Jul-20 |        310        0.14       64.53
  23-Jul-20 |        310        0.14       64.67
  24-Jul-20 |        310        0.14       64.81
  25-Jul-20 |        310        0.14       64.95
  26-Jul-20 |        310        0.14       65.09
  27-Jul-20 |        310        0.14       65.23
  28-Jul-20 |        310        0.14       65.37
  29-Jul-20 |        310        0.14       65.51
  30-Jul-20 |        310        0.14       65.65
  31-Jul-20 |        310        0.14       65.79
   1-Aug-20 |        310        0.14       65.92
   2-Aug-20 |        310        0.14       66.06
   3-Aug-20 |        310        0.14       66.20
   4-Aug-20 |        310        0.14       66.34
   5-Aug-20 |        310        0.14       66.48
   6-Aug-20 |        310        0.14       66.62
   7-Aug-20 |        310        0.14       66.76
   8-Aug-20 |        310        0.14       66.90
   9-Aug-20 |        310        0.14       67.04
  10-Aug-20 |        310        0.14       67.18
  11-Aug-20 |        310        0.14       67.32
  12-Aug-20 |        310        0.14       67.45
  13-Aug-20 |        310        0.14       67.59
  14-Aug-20 |        310        0.14       67.73
  15-Aug-20 |        310        0.14       67.87
  16-Aug-20 |        310        0.14       68.01
  17-Aug-20 |        310        0.14       68.15
  18-Aug-20 |        310        0.14       68.29
  19-Aug-20 |        310        0.14       68.43
  20-Aug-20 |        310        0.14       68.57
  21-Aug-20 |        310        0.14       68.71
  22-Aug-20 |        310        0.14       68.85
  23-Aug-20 |        310        0.14       68.98
  24-Aug-20 |        310        0.14       69.12
  25-Aug-20 |        310        0.14       69.26
  26-Aug-20 |        310        0.14       69.40
  27-Aug-20 |        310        0.14       69.54
  28-Aug-20 |        310        0.14       69.68
  29-Aug-20 |        310        0.14       69.82
  30-Aug-20 |        310        0.14       69.96
  31-Aug-20 |        310        0.14       70.10
   1-Sep-20 |        310        0.14       70.24
   2-Sep-20 |        310        0.14       70.38
   3-Sep-20 |        310        0.14       70.51
   4-Sep-20 |        310        0.14       70.65
   5-Sep-20 |        310        0.14       70.79
   6-Sep-20 |        310        0.14       70.93
   7-Sep-20 |        310        0.14       71.07
   8-Sep-20 |        310        0.14       71.21
   9-Sep-20 |        310        0.14       71.35
  10-Sep-20 |        310        0.14       71.49
  11-Sep-20 |        310        0.14       71.63
  12-Sep-20 |        310        0.14       71.77
  13-Sep-20 |        310        0.14       71.91
  14-Sep-20 |        310        0.14       72.04
  15-Sep-20 |        310        0.14       72.18
  16-Sep-20 |        310        0.14       72.32
  17-Sep-20 |        310        0.14       72.46
  18-Sep-20 |        310        0.14       72.60
  19-Sep-20 |        310        0.14       72.74
  20-Sep-20 |        310        0.14       72.88
  21-Sep-20 |        310        0.14       73.02
  22-Sep-20 |        310        0.14       73.16
  23-Sep-20 |        310        0.14       73.30
  24-Sep-20 |        310        0.14       73.44
  25-Sep-20 |        310        0.14       73.57
  26-Sep-20 |        310        0.14       73.71
  27-Sep-20 |        310        0.14       73.85
  28-Sep-20 |        310        0.14       73.99
  29-Sep-20 |        310        0.14       74.13
  30-Sep-20 |        310        0.14       74.27
   1-Oct-20 |        310        0.14       74.41
   2-Oct-20 |        310        0.14       74.55
   3-Oct-20 |        310        0.14       74.69
   4-Oct-20 |        310        0.14       74.83
   5-Oct-20 |        310        0.14       74.97
   6-Oct-20 |        310        0.14       75.10
   7-Oct-20 |        310        0.14       75.24
   8-Oct-20 |        310        0.14       75.38
   9-Oct-20 |        310        0.14       75.52
  10-Oct-20 |        310        0.14       75.66
  11-Oct-20 |        310        0.14       75.80
  12-Oct-20 |        310        0.14       75.94
  13-Oct-20 |        310        0.14       76.08
  14-Oct-20 |        310        0.14       76.22
  15-Oct-20 |        310        0.14       76.36
  16-Oct-20 |        310        0.14       76.50
  17-Oct-20 |        310        0.14       76.63
  18-Oct-20 |        310        0.14       76.77
  19-Oct-20 |        310        0.14       76.91
  20-Oct-20 |        310        0.14       77.05
  21-Oct-20 |        310        0.14       77.19
  22-Oct-20 |        310        0.14       77.33
  23-Oct-20 |        310        0.14       77.47
  24-Oct-20 |        310        0.14       77.61
  25-Oct-20 |        310        0.14       77.75
  26-Oct-20 |        310        0.14       77.89
  27-Oct-20 |        310        0.14       78.03
  28-Oct-20 |        310        0.14       78.16
  29-Oct-20 |        310        0.14       78.30
  30-Oct-20 |        310        0.14       78.44
  31-Oct-20 |        310        0.14       78.58
   1-Nov-20 |        310        0.14       78.72
   2-Nov-20 |        310        0.14       78.86
   3-Nov-20 |        310        0.14       79.00
   4-Nov-20 |        310        0.14       79.14
   5-Nov-20 |        310        0.14       79.28
   6-Nov-20 |        310        0.14       79.42
   7-Nov-20 |        310        0.14       79.55
   8-Nov-20 |        310        0.14       79.69
   9-Nov-20 |        310        0.14       79.83
  10-Nov-20 |        310        0.14       79.97
  11-Nov-20 |        310        0.14       80.11
  12-Nov-20 |        310        0.14       80.25
  13-Nov-20 |        310        0.14       80.39
  14-Nov-20 |        310        0.14       80.53
  15-Nov-20 |        310        0.14       80.67
  16-Nov-20 |        310        0.14       80.81
  17-Nov-20 |        310        0.14       80.95
  18-Nov-20 |        310        0.14       81.08
  19-Nov-20 |        310        0.14       81.22
  20-Nov-20 |        310        0.14       81.36
  21-Nov-20 |        310        0.14       81.50
  22-Nov-20 |        310        0.14       81.64
  23-Nov-20 |        310        0.14       81.78
  24-Nov-20 |        310        0.14       81.92
  25-Nov-20 |        310        0.14       82.06
  26-Nov-20 |        310        0.14       82.20
  27-Nov-20 |        310        0.14       82.34
  28-Nov-20 |        310        0.14       82.48
  29-Nov-20 |        310        0.14       82.61
  30-Nov-20 |        310        0.14       82.75
   1-Dec-20 |        310        0.14       82.89
   2-Dec-20 |        310        0.14       83.03
   3-Dec-20 |        310        0.14       83.17
   4-Dec-20 |        310        0.14       83.31
   5-Dec-20 |        310        0.14       83.45
   6-Dec-20 |        310        0.14       83.59
   7-Dec-20 |        310        0.14       83.73
   8-Dec-20 |        310        0.14       83.87
   9-Dec-20 |        310        0.14       84.01
  10-Dec-20 |        310        0.14       84.14
  11-Dec-20 |        310        0.14       84.28
  12-Dec-20 |        310        0.14       84.42
  13-Dec-20 |        310        0.14       84.56
  14-Dec-20 |        310        0.14       84.70
  15-Dec-20 |        310        0.14       84.84
  16-Dec-20 |        310        0.14       84.98
  17-Dec-20 |        310        0.14       85.12
  18-Dec-20 |        310        0.14       85.26
  19-Dec-20 |        310        0.14       85.40
  20-Dec-20 |        310        0.14       85.54
  21-Dec-20 |        310        0.14       85.67
  22-Dec-20 |        310        0.14       85.81
  23-Dec-20 |        310        0.14       85.95
  24-Dec-20 |        310        0.14       86.09
  25-Dec-20 |        310        0.14       86.23
  26-Dec-20 |        310        0.14       86.37
  27-Dec-20 |        310        0.14       86.51
  28-Dec-20 |        310        0.14       86.65
  29-Dec-20 |        310        0.14       86.79
  30-Dec-20 |        310        0.14       86.93
  31-Dec-20 |        310        0.14       87.07
   1-Jan-21 |        310        0.14       87.20
   2-Jan-21 |        310        0.14       87.34
   3-Jan-21 |        310        0.14       87.48
   4-Jan-21 |        310        0.14       87.62
   5-Jan-21 |        310        0.14       87.76
   6-Jan-21 |        310        0.14       87.90
   7-Jan-21 |        310        0.14       88.04
   8-Jan-21 |        310        0.14       88.18
   9-Jan-21 |        310        0.14       88.32
  10-Jan-21 |        310        0.14       88.46
  11-Jan-21 |        310        0.14       88.60
  12-Jan-21 |        310        0.14       88.73
  13-Jan-21 |        310        0.14       88.87
  14-Jan-21 |        310        0.14       89.01
  15-Jan-21 |        310        0.14       89.15
  16-Jan-21 |        310        0.14       89.29
  17-Jan-21 |        310        0.14       89.43
  18-Jan-21 |        310        0.14       89.57
  19-Jan-21 |        310        0.14       89.71
  20-Jan-21 |        310        0.14       89.85
  21-Jan-21 |        310        0.14       89.99
  22-Jan-21 |        310        0.14       90.13
  23-Jan-21 |        310        0.14       90.26
  24-Jan-21 |        310        0.14       90.40
  25-Jan-21 |        310        0.14       90.54
  26-Jan-21 |        310        0.14       90.68
  27-Jan-21 |        310        0.14       90.82
  28-Jan-21 |        310        0.14       90.96
  29-Jan-21 |        310        0.14       91.10
  30-Jan-21 |        310        0.14       91.24
  31-Jan-21 |        310        0.14       91.38
   1-Feb-21 |        310        0.14       91.52
   2-Feb-21 |        310        0.14       91.66
   3-Feb-21 |        310        0.14       91.79
   4-Feb-21 |        310        0.14       91.93
   5-Feb-21 |        310        0.14       92.07
   6-Feb-21 |        310        0.14       92.21
   7-Feb-21 |        310        0.14       92.35
   8-Feb-21 |        310        0.14       92.49
   9-Feb-21 |        310        0.14       92.63
  10-Feb-21 |        310        0.14       92.77
  11-Feb-21 |        310        0.14       92.91
  12-Feb-21 |        310        0.14       93.05
  13-Feb-21 |        310        0.14       93.18
  14-Feb-21 |        310        0.14       93.32
  15-Feb-21 |        310        0.14       93.46
  16-Feb-21 |        310        0.14       93.60
  17-Feb-21 |        310        0.14       93.74
  18-Feb-21 |        310        0.14       93.88
  19-Feb-21 |        310        0.14       94.02
  20-Feb-21 |        310        0.14       94.16
  21-Feb-21 |        310        0.14       94.30
  22-Feb-21 |        310        0.14       94.44
  23-Feb-21 |        310        0.14       94.58
  24-Feb-21 |        310        0.14       94.71
  25-Feb-21 |        310        0.14       94.85
  26-Feb-21 |        310        0.14       94.99
  27-Feb-21 |        310        0.14       95.13
  28-Feb-21 |        310        0.14       95.27
   1-Mar-21 |        310        0.14       95.41
   2-Mar-21 |        310        0.14       95.55
   3-Mar-21 |        310        0.14       95.69
   4-Mar-21 |        310        0.14       95.83
   5-Mar-21 |        310        0.14       95.97
   6-Mar-21 |        310        0.14       96.11
   7-Mar-21 |        310        0.14       96.24
   8-Mar-21 |        310        0.14       96.38
   9-Mar-21 |        310        0.14       96.52
  10-Mar-21 |        310        0.14       96.66
  11-Mar-21 |        310        0.14       96.80
  12-Mar-21 |        310        0.14       96.94
  13-Mar-21 |        310        0.14       97.08
  14-Mar-21 |        310        0.14       97.22
  15-Mar-21 |        310        0.14       97.36
  16-Mar-21 |        310        0.14       97.50
  17-Mar-21 |        310        0.14       97.64
  18-Mar-21 |        310        0.14       97.77
  19-Mar-21 |        310        0.14       97.91
  20-Mar-21 |        310        0.14       98.05
  21-Mar-21 |        310        0.14       98.19
  22-Mar-21 |        310        0.14       98.33
  23-Mar-21 |        310        0.14       98.47
  24-Mar-21 |        310        0.14       98.61
  25-Mar-21 |        310        0.14       98.75
  26-Mar-21 |        310        0.14       98.89
  27-Mar-21 |        310        0.14       99.03
  28-Mar-21 |        310        0.14       99.17
  29-Mar-21 |        310        0.14       99.30
  30-Mar-21 |        310        0.14       99.44
  31-Mar-21 |        310        0.14       99.58
   1-Apr-21 |        310        0.14       99.72
   2-Apr-21 |        310        0.14       99.86
   3-Apr-21 |        310        0.14      100.00
------------+-----------------------------------
      Total |    222,890      100.00

. ** 222,890 Observations. 310 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. 
. ********************************************************************************
. ********************* [1] CALCULATE ACTUAL STACK DAY MASS **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Replace tot_report_hrs to zero 
.         ** if the stack was not sending a valid caliberated stack-day kg/hr that day
.         gen tot_report_hrs_rule`i' = tot_report_hrs
  3.         replace tot_report_hrs_rule`i' = 0 if D_vctransmitting_rule`i' == 0 
  4.         label var tot_report_hrs_rule`i' /// 
>                 "[RE-LABELED] Stack-day VALID CALIBRATED Reporting Hours from CEMS - rule `i'"
  5. 
.         ** Calculate DAILY actual mass emissions using Cems Day Reporting Hours
.         gen stack_daily_mass_actual_rule`i' = pm_mass_rule`i' * tot_report_hrs_rule`i'
  6.         la var stack_daily_mass_actual_rule`i' ///
>                 "Stack-day Actual Mass Emissions (kg) from CEMS Reported Hours - rule `i'"
  7. 
. }
(13,811 real changes made)
(92,469 missing values generated)
(13,152 real changes made)
(91,810 missing values generated)
(51,885 real changes made)
(130,543 missing values generated)
(51,410 real changes made)
(130,068 missing values generated)
(72,276 real changes made)
(150,934 missing values generated)
(71,909 real changes made)
(150,567 missing values generated)
(61,133 real changes made)
(139,791 missing values generated)
(60,702 real changes made)
(139,360 missing values generated)
(30,334 real changes made)
(108,992 missing values generated)
(29,748 real changes made)
(108,406 missing values generated)

. 
. ********************************************************************************
. ***************** [2] DAILY NON-REPORTING HOURS FOR IMPUTATION *****************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate DAILY non-reporting hours for imputation
.         gen daily_nonreport_hrs_rule`i' = 24 - tot_report_hrs_rule`i'   
  3.         order daily_nonreport_hrs_rule`i', a(tot_report_hrs_rule`i')
  4.         la var daily_nonreport_hrs_rule`i' ///
>                 "Stack Daily NON-Reporting Hours - CEMS - rule `i'"
  5. 
. }

. 
. ********************************************************************************
. ********* [3] For Imp: GENERATE STACK'S OWN WEEK and MONTH MEAN KG/HR **********
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate stack's own week mean kg/hr for missing pm mass values
.         bysort composite_id week: egen week_mean_mass_rule`i' = mean(pm_mass_rule`i')
  3.         la var week_mean_mass_rule`i' "Stack Week Mean kg/hr - rule `i'"
  4. 
.         ** Calculate treatment group week mean kg/hr for stacks missing entire week of pm mass
.         bysort treatmentstatus month16: egen group_month_mean_mass_rule`i' = mean(pm_mass_rule`i')
  5.         la var group_month_mean_mass_rule`i' "Treatment Arm Month Mean kg/hr - rule `i'"
  6. 
. }
(77,721 missing values generated)
(77,182 missing values generated)
(119,617 missing values generated)
(119,246 missing values generated)
(141,866 missing values generated)
(141,642 missing values generated)
(129,965 missing values generated)
(129,650 missing values generated)
(96,226 missing values generated)
(95,778 missing values generated)

. 
. /*******************************************************************************
>            NOW READY FOR IMPUTATION RULE 1b.
>            THE IMPLEMENTATION OF THIS RULE WILL BE:
> 
>            1)   IMPUTE STACK'S OWN WEEK MEAN PM_MASS (KG/HR) FOR ALL MISSING VALUES
>            OF STACK DAY PM_MASS (KG/HR). 
>            2)   IF WEEK MEAN KG/HR IS MISSING, IMPUTE TREATMENT ARM (GROUP) MONTH 
>            MEAN PM_MASS (KG/HR)
>            3)   THE FINAL EMISSION QUANTITY IS:
> 
>            VALIDATED STACK MASS (KG) = 
>            ACTUAL STACK MASS (KG) USING CEMS REPORTED HOURS +
>            IMPUTED STACK MASS (KG) USING CEMS NON-REPORTED HOURS
>    ****************************************************************************/
. 
. 
. ********************************************************************************
. ******************** [4] CALCULATE DAILY STACK IMPUTED MASS ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate PER DAY imputed emissions
.         gen stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * week_mean_mass_rule`i'
  3.         replace stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * group_month_mean_mass_rule`i' ///
>                 if week_mean_mass_rule`i' == .
  4.         la var stack_daily_mass_imp_rule`i' ///
>                 "Stack-day Imputed Mass Emissions (kg) from CEMS Non-Reported Hours - trunc rule `i'"
  5. 
.         ** Correct for week of Diwali 2019 when imputation should be zero.
.         replace stack_daily_mass_imp_rule`i' = 0 if ///
>                 date >= date("2019oct26", "YMD") & ///
>                 date <= date("2019nov03", "YMD") & ///
>                 stack_daily_mass_imp_rule`i' != .
  6. 
. }
(77,721 missing values generated)
(77,721 real changes made)
note: label truncated to 80 characters
(1,899 real changes made)
(77,182 missing values generated)
(77,182 real changes made)
note: label truncated to 80 characters
(1,887 real changes made)
(119,617 missing values generated)
(119,617 real changes made)
note: label truncated to 80 characters
(2,148 real changes made)
(119,246 missing values generated)
(119,246 real changes made)
note: label truncated to 80 characters
(2,143 real changes made)
(141,866 missing values generated)
(141,866 real changes made)
note: label truncated to 80 characters
(2,344 real changes made)
(141,642 missing values generated)
(141,642 real changes made)
note: label truncated to 80 characters
(2,339 real changes made)
(129,965 missing values generated)
(129,965 real changes made)
note: label truncated to 80 characters
(2,236 real changes made)
(129,650 missing values generated)
(129,650 real changes made)
note: label truncated to 80 characters
(2,231 real changes made)
(96,226 missing values generated)
(96,226 real changes made)
note: label truncated to 80 characters
(2,002 real changes made)
(95,778 missing values generated)
(95,778 real changes made)
note: label truncated to 80 characters
(1,991 real changes made)

. 
. ********************************************************************************
. ******************* [5] CALCULATE DAILY STACK VALIDATED MASS *******************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate validated DAY emissions per stack
.         gen stack_daily_mass_val_rule`i' = stack_daily_mass_actual_rule`i' + stack_daily_mass_imp_rule`i'
  3.         replace stack_daily_mass_val_rule`i' = stack_daily_mass_imp_rule`i' ///
>                 if stack_daily_mass_val_rule`i' == .
  4.         la var stack_daily_mass_val_rule`i' ///
>                 "Stack-day Validated Mass Emissions (kg) (=Stack-day Actual + Stack-day Imp) - trunc rule `i'"
  5. 
. }
(92,469 missing values generated)
(92,469 real changes made)
note: label truncated to 80 characters
(91,810 missing values generated)
(91,810 real changes made)
note: label truncated to 80 characters
(130,543 missing values generated)
(130,543 real changes made)
note: label truncated to 80 characters
(130,068 missing values generated)
(130,068 real changes made)
note: label truncated to 80 characters
(150,934 missing values generated)
(150,934 real changes made)
note: label truncated to 80 characters
(150,567 missing values generated)
(150,567 real changes made)
note: label truncated to 80 characters
(139,791 missing values generated)
(139,791 real changes made)
note: label truncated to 80 characters
(139,360 missing values generated)
(139,360 real changes made)
note: label truncated to 80 characters
(108,992 missing values generated)
(108,992 real changes made)
note: label truncated to 80 characters
(108,406 missing values generated)
(108,406 real changes made)
note: label truncated to 80 characters

. 
. preserve

. keep date composite_id gpcb_id treatmentstatus group_month_mean_mass_rule0 stack_daily_mass_actual_rule0 stack_daily_mass_imp_rule0 stack_daily_mass_val_rule0

. order date composite_id gpcb_id treatmentstatus group_month_mean_mass_rule0 stack_daily_mass_actual_rule0 stack_daily_mass_imp_rule0 stack_daily_mass_val_rule0

. rename group_month_mean_mass_rule0 mass_rate_imp_B

. rename stack_daily_mass_actual_rule0 stack_daily_mass_actual_B

. rename stack_daily_mass_imp_rule0 stack_daily_mass_imp_B

. rename stack_daily_mass_val_rule0 stack_daily_mass_val_B 

. sort date gpcb_id composite_id

. save "$IMPUTATION_DATA_OUT/StackDayPMMassRuleB.dta", replace
(file 02DataPipeline/emissions/imputation/StackDayPMMassRuleB.dta not found)
file 02DataPipeline/emissions/imputation/StackDayPMMassRuleB.dta saved

. *pause
. restore

. 
. 
. /*******************************************************************************
>            NOW READY TO MAKE THE DEPENDENT VARIABLE FOR REGRESSIONS IN PART 6 
>            (6. TREATMENT EFFECT ANALYSIS). THIS VAR IS PLANT MONTH MASS (KG).
> 
>            STEPS TO CREATE THIS VARIABLE WILL BE:
> 
>            6.1) CALCULATE STACK MONTH MASS (KG), AND THEN PLANT MONTH MASS (KG).
>            FIRST GENERATE THESE VARIABLES IN THE STACK-DAY LEVEL DATA SET 
>            AND SAVE IT FOR FUTURE USE IF NEEDED ("_StackDayLevel.dta").
> 
>            6.2) THEN, COLLAPSE THE STACK-DAY LEVEL DATA SET TO KEEP ONE DATA POINT 
>            PER PLANT PER MONTH ("_PlantMonthLevel.dta"). 
> 
>            CONTAINS THE DEPENDENT VARIABLE: PLANT-MONTH MASS (KG) EMISSIONS 
>            USING IMPUTATION RULE 1a.
>    ****************************************************************************/
. 
. preserve

.    
. ********************************************************************************
. ********************* [6.1] GENERATE STACK-MONTH MASS (KG) *********************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculates MONTHLY validated emissions PER STACK
.         bysort composite_id month16: egen stack_month_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id month16: egen miss_stack_month_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_month_mass_val_rule`i' = . if miss_stack_month_mass_val == 1
  5.         la var stack_month_mass_val_rule`i' ///
>                 "Stack-month Validated Mass Emissions (kg)"
  6.         drop miss_stack_month_mass_val
  7. 
. }       
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id month16: gen dump=_n

. bysort composite_id month16: keep if _n==_N     
(215,450 observations deleted)

. keep composite_id industry_id gpcb_id month16 treatmentstatus stack_month_mass_val* 

. ** 7,440 observations. 310 stacks. 24 months from April 2019 to March 2021.
. 
. ********************************************************************************
. ******************** [6.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. /**     AS PER NICK'S INSTRUCTION ON WEEKLY CALL 01 DEC 2020: FOR PLANTS WITH >1 STACK, 
>         WE WILL ONLY CALCULATE THEIR PLANT MASS (KG) SUM IF ALL STACKS ARE CONNECTED. 
>         IF STACKS ARE PARTIALLY CONNECTED (i.e., ONLY 1 OF 3 STACKS CONNECTED), 
>         THE ENTIRE PLANT SUM WILL BE MISSING.   **/
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER PLANT
.         bysort gpcb_id month16: egen ind_month_mass_val_rule`i' = sum(stack_month_mass_val_rule`i')
  3.         bysort gpcb_id month16: egen miss_ind_month_mass_val = max(missing(stack_month_mass_val_rule`i'))
  4.         replace ind_month_mass_val_rule`i' = . if miss_ind_month_mass_val == 1
  5.         la var stack_month_mass_val_rule`i' ///
>                 "Plant-month Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_month_mass_val
  7. 
. }
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id month16: gen dump=_n

. bysort gpcb_id month16: keep if _n==_N
(432 observations deleted)

. keep industry_id gpcb_id month16 treatmentstatus ind_month_mass_val* 

. ** 7,008 observations. 292 plants. 24 months from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/PlantMonthPMMassRuleB.dta", replace
(file 02DataPipeline/emissions/imputation/PlantMonthPMMassRuleB.dta not found)
file 02DataPipeline/emissions/imputation/PlantMonthPMMassRuleB.dta saved

. 
. restore

. 
. /*******************************************************************************
>            NOW WE MAKE THE DEPENDENT VARIABLE FOR PLOTTING TIME SERIES 
>            THIS VAR IS PLANT WEEK MASS (KG).
>    ****************************************************************************/
. 
. preserve

. 
. ********************************************************************************
. ********************* [7.1] GENERATE STACK-WEEK MASS (KG) **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate WEEKLY validated emissions PER STACK
.         bysort composite_id week: egen stack_week_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id week: egen miss_stack_week_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_week_mass_val_rule`i' = . if miss_stack_week_mass_val == 1
  5.         la var stack_week_mass_val_rule`i' ///
>                 "Stack-week Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_stack_week_mass_val
  7. 
. }
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id week: gen dump=_n

. bysort composite_id week: keep if _n==_N        
(190,960 observations deleted)

. keep composite_id industry_id gpcb_id week treatmentstatus stack_week_mass_val*

. ** 31,930 Observations. 310 Stacks. 103 weeks from April 2019 to March 2021.
. 
. ********************************************************************************
. ******************** [7.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate WEEKLY validated emissions PER PLANT
.         bysort gpcb_id week: egen ind_week_mass_val_rule`i' = sum(stack_week_mass_val_rule`i')
  3.         bysort gpcb_id week: egen miss_ind_week_mass_val = max(missing(stack_week_mass_val_rule`i'))
  4.         replace ind_week_mass_val_rule`i' = . if miss_ind_week_mass_val == 1
  5.         la var stack_week_mass_val_rule`i' ///
>                 "Plant-week Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_week_mass_val
  7. 
. }
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id week: gen dump=_n

. bysort gpcb_id week: keep if _n==_N
(1,854 observations deleted)

. keep industry_id gpcb_id week treatmentstatus ind_week_mass_val* 

. ** 30,076 Observations. 292 Plants. 103 weeks from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/PlantWeekPMMassRuleB.dta", replace
(file 02DataPipeline/emissions/imputation/PlantWeekPMMassRuleB.dta not found)
file 02DataPipeline/emissions/imputation/PlantWeekPMMassRuleB.dta saved

. 
. restore

. 
end of do-file

. do "$CODE_DIR/imputation/4. Create PM Mass (Treatment-Month, Plant-Period).do"

. /*******************************************************************************
>            Author:      Dipika Gawande
>            Project: ETS
>            Purpose: Create the dependent variable for regression, PLANT-MONTH KG 
>            EMISSIONS (KG/MONTH), using IMPUTATION RULE C: WITHIN-TREATMENT 
>            MEAN MONTH KG/HR.
> 
>            NOTE: IMPUTATION RULE C is executed as follows:
> 
>            1) Missing values of Stack day kg/hr are imputed with the stack's 
>            own week mean kg/hr.
> 
>            2) If no week mean kg/hr (i.e., stack is missing entire week of 
>            stack-day observations, or is not CEMS-connected), all remaining 
>            missing values of Stack day kg/hr are imputed with the Treatment 
>            arm month mean kg/hr.
> 
>            Date created: 01 August 2020
>            Version: STATA 15 MP
> 
>            Last edited: 13 January 2022
>            Edited by: Jeanne, Vineet, Kaixin
>    ****************************************************************************/
. 
. set more off

. clear all

. pause on

. 
. *----------------------------------------------------------------------
. 
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. drop if date < date("2019jan16", "YMD")
(0 observations deleted)

. format date %tddd-Mon-YY

. sort date composite_id

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        337        0.14        0.14
  17-Apr-19 |        337        0.14        0.28
  18-Apr-19 |        337        0.14        0.42
  19-Apr-19 |        337        0.14        0.56
  20-Apr-19 |        337        0.14        0.70
  21-Apr-19 |        337        0.14        0.83
  22-Apr-19 |        337        0.14        0.97
  23-Apr-19 |        337        0.14        1.11
  24-Apr-19 |        337        0.14        1.25
  25-Apr-19 |        337        0.14        1.39
  26-Apr-19 |        337        0.14        1.53
  27-Apr-19 |        337        0.14        1.67
  28-Apr-19 |        337        0.14        1.81
  29-Apr-19 |        337        0.14        1.95
  30-Apr-19 |        337        0.14        2.09
   1-May-19 |        337        0.14        2.23
   2-May-19 |        337        0.14        2.36
   3-May-19 |        337        0.14        2.50
   4-May-19 |        337        0.14        2.64
   5-May-19 |        337        0.14        2.78
   6-May-19 |        337        0.14        2.92
   7-May-19 |        337        0.14        3.06
   8-May-19 |        337        0.14        3.20
   9-May-19 |        337        0.14        3.34
  10-May-19 |        337        0.14        3.48
  11-May-19 |        337        0.14        3.62
  12-May-19 |        337        0.14        3.76
  13-May-19 |        337        0.14        3.89
  14-May-19 |        337        0.14        4.03
  15-May-19 |        337        0.14        4.17
  16-May-19 |        337        0.14        4.31
  17-May-19 |        337        0.14        4.45
  18-May-19 |        337        0.14        4.59
  19-May-19 |        337        0.14        4.73
  20-May-19 |        337        0.14        4.87
  21-May-19 |        337        0.14        5.01
  22-May-19 |        337        0.14        5.15
  23-May-19 |        337        0.14        5.29
  24-May-19 |        337        0.14        5.42
  25-May-19 |        337        0.14        5.56
  26-May-19 |        337        0.14        5.70
  27-May-19 |        337        0.14        5.84
  28-May-19 |        337        0.14        5.98
  29-May-19 |        337        0.14        6.12
  30-May-19 |        337        0.14        6.26
  31-May-19 |        337        0.14        6.40
   1-Jun-19 |        337        0.14        6.54
   2-Jun-19 |        337        0.14        6.68
   3-Jun-19 |        337        0.14        6.82
   4-Jun-19 |        337        0.14        6.95
   5-Jun-19 |        337        0.14        7.09
   6-Jun-19 |        337        0.14        7.23
   7-Jun-19 |        337        0.14        7.37
   8-Jun-19 |        337        0.14        7.51
   9-Jun-19 |        337        0.14        7.65
  10-Jun-19 |        337        0.14        7.79
  11-Jun-19 |        337        0.14        7.93
  12-Jun-19 |        337        0.14        8.07
  13-Jun-19 |        337        0.14        8.21
  14-Jun-19 |        337        0.14        8.34
  15-Jun-19 |        337        0.14        8.48
  16-Jun-19 |        337        0.14        8.62
  17-Jun-19 |        337        0.14        8.76
  18-Jun-19 |        337        0.14        8.90
  19-Jun-19 |        337        0.14        9.04
  20-Jun-19 |        337        0.14        9.18
  21-Jun-19 |        337        0.14        9.32
  22-Jun-19 |        337        0.14        9.46
  23-Jun-19 |        337        0.14        9.60
  24-Jun-19 |        337        0.14        9.74
  25-Jun-19 |        337        0.14        9.87
  26-Jun-19 |        337        0.14       10.01
  27-Jun-19 |        337        0.14       10.15
  28-Jun-19 |        337        0.14       10.29
  29-Jun-19 |        337        0.14       10.43
  30-Jun-19 |        337        0.14       10.57
   1-Jul-19 |        337        0.14       10.71
   2-Jul-19 |        337        0.14       10.85
   3-Jul-19 |        337        0.14       10.99
   4-Jul-19 |        337        0.14       11.13
   5-Jul-19 |        337        0.14       11.27
   6-Jul-19 |        337        0.14       11.40
   7-Jul-19 |        337        0.14       11.54
   8-Jul-19 |        337        0.14       11.68
   9-Jul-19 |        337        0.14       11.82
  10-Jul-19 |        337        0.14       11.96
  11-Jul-19 |        337        0.14       12.10
  12-Jul-19 |        337        0.14       12.24
  13-Jul-19 |        337        0.14       12.38
  14-Jul-19 |        337        0.14       12.52
  15-Jul-19 |        337        0.14       12.66
  16-Jul-19 |        337        0.14       12.80
  17-Jul-19 |        337        0.14       12.93
  18-Jul-19 |        337        0.14       13.07
  19-Jul-19 |        337        0.14       13.21
  20-Jul-19 |        337        0.14       13.35
  21-Jul-19 |        337        0.14       13.49
  22-Jul-19 |        337        0.14       13.63
  23-Jul-19 |        337        0.14       13.77
  24-Jul-19 |        337        0.14       13.91
  25-Jul-19 |        337        0.14       14.05
  26-Jul-19 |        337        0.14       14.19
  27-Jul-19 |        337        0.14       14.33
  28-Jul-19 |        337        0.14       14.46
  29-Jul-19 |        337        0.14       14.60
  30-Jul-19 |        337        0.14       14.74
  31-Jul-19 |        337        0.14       14.88
   1-Aug-19 |        337        0.14       15.02
   2-Aug-19 |        337        0.14       15.16
   3-Aug-19 |        337        0.14       15.30
   4-Aug-19 |        337        0.14       15.44
   5-Aug-19 |        337        0.14       15.58
   6-Aug-19 |        337        0.14       15.72
   7-Aug-19 |        337        0.14       15.86
   8-Aug-19 |        337        0.14       15.99
   9-Aug-19 |        337        0.14       16.13
  10-Aug-19 |        337        0.14       16.27
  11-Aug-19 |        337        0.14       16.41
  12-Aug-19 |        337        0.14       16.55
  13-Aug-19 |        337        0.14       16.69
  14-Aug-19 |        337        0.14       16.83
  15-Aug-19 |        337        0.14       16.97
  16-Aug-19 |        337        0.14       17.11
  17-Aug-19 |        337        0.14       17.25
  18-Aug-19 |        337        0.14       17.39
  19-Aug-19 |        337        0.14       17.52
  20-Aug-19 |        337        0.14       17.66
  21-Aug-19 |        337        0.14       17.80
  22-Aug-19 |        337        0.14       17.94
  23-Aug-19 |        337        0.14       18.08
  24-Aug-19 |        337        0.14       18.22
  25-Aug-19 |        337        0.14       18.36
  26-Aug-19 |        337        0.14       18.50
  27-Aug-19 |        337        0.14       18.64
  28-Aug-19 |        337        0.14       18.78
  29-Aug-19 |        337        0.14       18.92
  30-Aug-19 |        337        0.14       19.05
  31-Aug-19 |        337        0.14       19.19
   1-Sep-19 |        337        0.14       19.33
   2-Sep-19 |        337        0.14       19.47
   3-Sep-19 |        337        0.14       19.61
   4-Sep-19 |        337        0.14       19.75
   5-Sep-19 |        337        0.14       19.89
   6-Sep-19 |        337        0.14       20.03
   7-Sep-19 |        337        0.14       20.17
   8-Sep-19 |        337        0.14       20.31
   9-Sep-19 |        337        0.14       20.45
  10-Sep-19 |        337        0.14       20.58
  11-Sep-19 |        337        0.14       20.72
  12-Sep-19 |        337        0.14       20.86
  13-Sep-19 |        337        0.14       21.00
  14-Sep-19 |        337        0.14       21.14
  15-Sep-19 |        337        0.14       21.28
  16-Sep-19 |        337        0.14       21.42
  17-Sep-19 |        337        0.14       21.56
  18-Sep-19 |        337        0.14       21.70
  19-Sep-19 |        337        0.14       21.84
  20-Sep-19 |        337        0.14       21.97
  21-Sep-19 |        337        0.14       22.11
  22-Sep-19 |        337        0.14       22.25
  23-Sep-19 |        337        0.14       22.39
  24-Sep-19 |        337        0.14       22.53
  25-Sep-19 |        337        0.14       22.67
  26-Sep-19 |        337        0.14       22.81
  27-Sep-19 |        337        0.14       22.95
  28-Sep-19 |        337        0.14       23.09
  29-Sep-19 |        337        0.14       23.23
  30-Sep-19 |        337        0.14       23.37
   1-Oct-19 |        337        0.14       23.50
   2-Oct-19 |        337        0.14       23.64
   3-Oct-19 |        337        0.14       23.78
   4-Oct-19 |        337        0.14       23.92
   5-Oct-19 |        337        0.14       24.06
   6-Oct-19 |        337        0.14       24.20
   7-Oct-19 |        337        0.14       24.34
   8-Oct-19 |        337        0.14       24.48
   9-Oct-19 |        337        0.14       24.62
  10-Oct-19 |        337        0.14       24.76
  11-Oct-19 |        337        0.14       24.90
  12-Oct-19 |        337        0.14       25.03
  13-Oct-19 |        337        0.14       25.17
  14-Oct-19 |        337        0.14       25.31
  15-Oct-19 |        337        0.14       25.45
  16-Oct-19 |        337        0.14       25.59
  17-Oct-19 |        337        0.14       25.73
  18-Oct-19 |        337        0.14       25.87
  19-Oct-19 |        337        0.14       26.01
  20-Oct-19 |        337        0.14       26.15
  21-Oct-19 |        337        0.14       26.29
  22-Oct-19 |        337        0.14       26.43
  23-Oct-19 |        337        0.14       26.56
  24-Oct-19 |        337        0.14       26.70
  25-Oct-19 |        337        0.14       26.84
  26-Oct-19 |        337        0.14       26.98
  27-Oct-19 |        337        0.14       27.12
  28-Oct-19 |        337        0.14       27.26
  29-Oct-19 |        337        0.14       27.40
  30-Oct-19 |        337        0.14       27.54
  31-Oct-19 |        337        0.14       27.68
   1-Nov-19 |        337        0.14       27.82
   2-Nov-19 |        337        0.14       27.96
   3-Nov-19 |        337        0.14       28.09
   4-Nov-19 |        337        0.14       28.23
   5-Nov-19 |        337        0.14       28.37
   6-Nov-19 |        337        0.14       28.51
   7-Nov-19 |        337        0.14       28.65
   8-Nov-19 |        337        0.14       28.79
   9-Nov-19 |        337        0.14       28.93
  10-Nov-19 |        337        0.14       29.07
  11-Nov-19 |        337        0.14       29.21
  12-Nov-19 |        337        0.14       29.35
  13-Nov-19 |        337        0.14       29.49
  14-Nov-19 |        337        0.14       29.62
  15-Nov-19 |        337        0.14       29.76
  16-Nov-19 |        337        0.14       29.90
  17-Nov-19 |        337        0.14       30.04
  18-Nov-19 |        337        0.14       30.18
  19-Nov-19 |        337        0.14       30.32
  20-Nov-19 |        337        0.14       30.46
  21-Nov-19 |        337        0.14       30.60
  22-Nov-19 |        337        0.14       30.74
  23-Nov-19 |        337        0.14       30.88
  24-Nov-19 |        337        0.14       31.02
  25-Nov-19 |        337        0.14       31.15
  26-Nov-19 |        337        0.14       31.29
  27-Nov-19 |        337        0.14       31.43
  28-Nov-19 |        337        0.14       31.57
  29-Nov-19 |        337        0.14       31.71
  30-Nov-19 |        337        0.14       31.85
   1-Dec-19 |        337        0.14       31.99
   2-Dec-19 |        337        0.14       32.13
   3-Dec-19 |        337        0.14       32.27
   4-Dec-19 |        337        0.14       32.41
   5-Dec-19 |        337        0.14       32.55
   6-Dec-19 |        337        0.14       32.68
   7-Dec-19 |        337        0.14       32.82
   8-Dec-19 |        337        0.14       32.96
   9-Dec-19 |        337        0.14       33.10
  10-Dec-19 |        337        0.14       33.24
  11-Dec-19 |        337        0.14       33.38
  12-Dec-19 |        337        0.14       33.52
  13-Dec-19 |        337        0.14       33.66
  14-Dec-19 |        337        0.14       33.80
  15-Dec-19 |        337        0.14       33.94
  16-Dec-19 |        337        0.14       34.08
  17-Dec-19 |        337        0.14       34.21
  18-Dec-19 |        337        0.14       34.35
  19-Dec-19 |        337        0.14       34.49
  20-Dec-19 |        337        0.14       34.63
  21-Dec-19 |        337        0.14       34.77
  22-Dec-19 |        337        0.14       34.91
  23-Dec-19 |        337        0.14       35.05
  24-Dec-19 |        337        0.14       35.19
  25-Dec-19 |        337        0.14       35.33
  26-Dec-19 |        337        0.14       35.47
  27-Dec-19 |        337        0.14       35.61
  28-Dec-19 |        337        0.14       35.74
  29-Dec-19 |        337        0.14       35.88
  30-Dec-19 |        337        0.14       36.02
  31-Dec-19 |        337        0.14       36.16
   1-Jan-20 |        337        0.14       36.30
   2-Jan-20 |        337        0.14       36.44
   3-Jan-20 |        337        0.14       36.58
   4-Jan-20 |        337        0.14       36.72
   5-Jan-20 |        337        0.14       36.86
   6-Jan-20 |        337        0.14       37.00
   7-Jan-20 |        337        0.14       37.13
   8-Jan-20 |        337        0.14       37.27
   9-Jan-20 |        337        0.14       37.41
  10-Jan-20 |        337        0.14       37.55
  11-Jan-20 |        337        0.14       37.69
  12-Jan-20 |        337        0.14       37.83
  13-Jan-20 |        337        0.14       37.97
  14-Jan-20 |        337        0.14       38.11
  15-Jan-20 |        337        0.14       38.25
  16-Jan-20 |        337        0.14       38.39
  17-Jan-20 |        337        0.14       38.53
  18-Jan-20 |        337        0.14       38.66
  19-Jan-20 |        337        0.14       38.80
  20-Jan-20 |        337        0.14       38.94
  21-Jan-20 |        337        0.14       39.08
  22-Jan-20 |        337        0.14       39.22
  23-Jan-20 |        337        0.14       39.36
  24-Jan-20 |        337        0.14       39.50
  25-Jan-20 |        337        0.14       39.64
  26-Jan-20 |        337        0.14       39.78
  27-Jan-20 |        337        0.14       39.92
  28-Jan-20 |        337        0.14       40.06
  29-Jan-20 |        337        0.14       40.19
  30-Jan-20 |        337        0.14       40.33
  31-Jan-20 |        337        0.14       40.47
   1-Feb-20 |        337        0.14       40.61
   2-Feb-20 |        337        0.14       40.75
   3-Feb-20 |        337        0.14       40.89
   4-Feb-20 |        337        0.14       41.03
   5-Feb-20 |        337        0.14       41.17
   6-Feb-20 |        337        0.14       41.31
   7-Feb-20 |        337        0.14       41.45
   8-Feb-20 |        337        0.14       41.59
   9-Feb-20 |        337        0.14       41.72
  10-Feb-20 |        337        0.14       41.86
  11-Feb-20 |        337        0.14       42.00
  12-Feb-20 |        337        0.14       42.14
  13-Feb-20 |        337        0.14       42.28
  14-Feb-20 |        337        0.14       42.42
  15-Feb-20 |        337        0.14       42.56
  16-Feb-20 |        337        0.14       42.70
  17-Feb-20 |        337        0.14       42.84
  18-Feb-20 |        337        0.14       42.98
  19-Feb-20 |        337        0.14       43.12
  20-Feb-20 |        337        0.14       43.25
  21-Feb-20 |        337        0.14       43.39
  22-Feb-20 |        337        0.14       43.53
  23-Feb-20 |        337        0.14       43.67
  24-Feb-20 |        337        0.14       43.81
  25-Feb-20 |        337        0.14       43.95
  26-Feb-20 |        337        0.14       44.09
  27-Feb-20 |        337        0.14       44.23
  28-Feb-20 |        337        0.14       44.37
  29-Feb-20 |        337        0.14       44.51
   1-Mar-20 |        337        0.14       44.65
   2-Mar-20 |        337        0.14       44.78
   3-Mar-20 |        337        0.14       44.92
   4-Mar-20 |        337        0.14       45.06
   5-Mar-20 |        337        0.14       45.20
   6-Mar-20 |        337        0.14       45.34
   7-Mar-20 |        337        0.14       45.48
   8-Mar-20 |        337        0.14       45.62
   9-Mar-20 |        337        0.14       45.76
  10-Mar-20 |        337        0.14       45.90
  11-Mar-20 |        337        0.14       46.04
  12-Mar-20 |        337        0.14       46.18
  13-Mar-20 |        337        0.14       46.31
  14-Mar-20 |        337        0.14       46.45
  15-Mar-20 |        337        0.14       46.59
  16-Mar-20 |        337        0.14       46.73
  17-Mar-20 |        337        0.14       46.87
  18-Mar-20 |        337        0.14       47.01
  19-Mar-20 |        337        0.14       47.15
  20-Mar-20 |        337        0.14       47.29
  21-Mar-20 |        337        0.14       47.43
  22-Mar-20 |        337        0.14       47.57
  23-Mar-20 |        337        0.14       47.71
  24-Mar-20 |        337        0.14       47.84
  25-Mar-20 |        337        0.14       47.98
  26-Mar-20 |        337        0.14       48.12
  27-Mar-20 |        337        0.14       48.26
  28-Mar-20 |        337        0.14       48.40
  29-Mar-20 |        337        0.14       48.54
  30-Mar-20 |        337        0.14       48.68
  31-Mar-20 |        337        0.14       48.82
   1-Apr-20 |        337        0.14       48.96
   2-Apr-20 |        337        0.14       49.10
   3-Apr-20 |        337        0.14       49.24
   4-Apr-20 |        337        0.14       49.37
   5-Apr-20 |        337        0.14       49.51
   6-Apr-20 |        337        0.14       49.65
   7-Apr-20 |        337        0.14       49.79
   8-Apr-20 |        337        0.14       49.93
   9-Apr-20 |        337        0.14       50.07
  10-Apr-20 |        337        0.14       50.21
  11-Apr-20 |        337        0.14       50.35
  12-Apr-20 |        337        0.14       50.49
  13-Apr-20 |        337        0.14       50.63
  14-Apr-20 |        337        0.14       50.76
  15-Apr-20 |        337        0.14       50.90
  16-Apr-20 |        337        0.14       51.04
  17-Apr-20 |        337        0.14       51.18
  18-Apr-20 |        337        0.14       51.32
  19-Apr-20 |        337        0.14       51.46
  20-Apr-20 |        337        0.14       51.60
  21-Apr-20 |        337        0.14       51.74
  22-Apr-20 |        337        0.14       51.88
  23-Apr-20 |        337        0.14       52.02
  24-Apr-20 |        337        0.14       52.16
  25-Apr-20 |        337        0.14       52.29
  26-Apr-20 |        337        0.14       52.43
  27-Apr-20 |        337        0.14       52.57
  28-Apr-20 |        337        0.14       52.71
  29-Apr-20 |        337        0.14       52.85
  30-Apr-20 |        337        0.14       52.99
   1-May-20 |        337        0.14       53.13
   2-May-20 |        337        0.14       53.27
   3-May-20 |        337        0.14       53.41
   4-May-20 |        337        0.14       53.55
   5-May-20 |        337        0.14       53.69
   6-May-20 |        337        0.14       53.82
   7-May-20 |        337        0.14       53.96
   8-May-20 |        337        0.14       54.10
   9-May-20 |        337        0.14       54.24
  10-May-20 |        337        0.14       54.38
  11-May-20 |        337        0.14       54.52
  12-May-20 |        337        0.14       54.66
  13-May-20 |        337        0.14       54.80
  14-May-20 |        337        0.14       54.94
  15-May-20 |        337        0.14       55.08
  16-May-20 |        337        0.14       55.22
  17-May-20 |        337        0.14       55.35
  18-May-20 |        337        0.14       55.49
  19-May-20 |        337        0.14       55.63
  20-May-20 |        337        0.14       55.77
  21-May-20 |        337        0.14       55.91
  22-May-20 |        337        0.14       56.05
  23-May-20 |        337        0.14       56.19
  24-May-20 |        337        0.14       56.33
  25-May-20 |        337        0.14       56.47
  26-May-20 |        337        0.14       56.61
  27-May-20 |        337        0.14       56.75
  28-May-20 |        337        0.14       56.88
  29-May-20 |        337        0.14       57.02
  30-May-20 |        337        0.14       57.16
  31-May-20 |        337        0.14       57.30
   1-Jun-20 |        337        0.14       57.44
   2-Jun-20 |        337        0.14       57.58
   3-Jun-20 |        337        0.14       57.72
   4-Jun-20 |        337        0.14       57.86
   5-Jun-20 |        337        0.14       58.00
   6-Jun-20 |        337        0.14       58.14
   7-Jun-20 |        337        0.14       58.28
   8-Jun-20 |        337        0.14       58.41
   9-Jun-20 |        337        0.14       58.55
  10-Jun-20 |        337        0.14       58.69
  11-Jun-20 |        337        0.14       58.83
  12-Jun-20 |        337        0.14       58.97
  13-Jun-20 |        337        0.14       59.11
  14-Jun-20 |        337        0.14       59.25
  15-Jun-20 |        337        0.14       59.39
  16-Jun-20 |        337        0.14       59.53
  17-Jun-20 |        337        0.14       59.67
  18-Jun-20 |        337        0.14       59.81
  19-Jun-20 |        337        0.14       59.94
  20-Jun-20 |        337        0.14       60.08
  21-Jun-20 |        337        0.14       60.22
  22-Jun-20 |        337        0.14       60.36
  23-Jun-20 |        337        0.14       60.50
  24-Jun-20 |        337        0.14       60.64
  25-Jun-20 |        337        0.14       60.78
  26-Jun-20 |        337        0.14       60.92
  27-Jun-20 |        337        0.14       61.06
  28-Jun-20 |        337        0.14       61.20
  29-Jun-20 |        337        0.14       61.34
  30-Jun-20 |        337        0.14       61.47
   1-Jul-20 |        337        0.14       61.61
   2-Jul-20 |        337        0.14       61.75
   3-Jul-20 |        337        0.14       61.89
   4-Jul-20 |        337        0.14       62.03
   5-Jul-20 |        337        0.14       62.17
   6-Jul-20 |        337        0.14       62.31
   7-Jul-20 |        337        0.14       62.45
   8-Jul-20 |        337        0.14       62.59
   9-Jul-20 |        337        0.14       62.73
  10-Jul-20 |        337        0.14       62.87
  11-Jul-20 |        337        0.14       63.00
  12-Jul-20 |        337        0.14       63.14
  13-Jul-20 |        337        0.14       63.28
  14-Jul-20 |        337        0.14       63.42
  15-Jul-20 |        337        0.14       63.56
  16-Jul-20 |        337        0.14       63.70
  17-Jul-20 |        337        0.14       63.84
  18-Jul-20 |        337        0.14       63.98
  19-Jul-20 |        337        0.14       64.12
  20-Jul-20 |        337        0.14       64.26
  21-Jul-20 |        337        0.14       64.39
  22-Jul-20 |        337        0.14       64.53
  23-Jul-20 |        337        0.14       64.67
  24-Jul-20 |        337        0.14       64.81
  25-Jul-20 |        337        0.14       64.95
  26-Jul-20 |        337        0.14       65.09
  27-Jul-20 |        337        0.14       65.23
  28-Jul-20 |        337        0.14       65.37
  29-Jul-20 |        337        0.14       65.51
  30-Jul-20 |        337        0.14       65.65
  31-Jul-20 |        337        0.14       65.79
   1-Aug-20 |        337        0.14       65.92
   2-Aug-20 |        337        0.14       66.06
   3-Aug-20 |        337        0.14       66.20
   4-Aug-20 |        337        0.14       66.34
   5-Aug-20 |        337        0.14       66.48
   6-Aug-20 |        337        0.14       66.62
   7-Aug-20 |        337        0.14       66.76
   8-Aug-20 |        337        0.14       66.90
   9-Aug-20 |        337        0.14       67.04
  10-Aug-20 |        337        0.14       67.18
  11-Aug-20 |        337        0.14       67.32
  12-Aug-20 |        337        0.14       67.45
  13-Aug-20 |        337        0.14       67.59
  14-Aug-20 |        337        0.14       67.73
  15-Aug-20 |        337        0.14       67.87
  16-Aug-20 |        337        0.14       68.01
  17-Aug-20 |        337        0.14       68.15
  18-Aug-20 |        337        0.14       68.29
  19-Aug-20 |        337        0.14       68.43
  20-Aug-20 |        337        0.14       68.57
  21-Aug-20 |        337        0.14       68.71
  22-Aug-20 |        337        0.14       68.85
  23-Aug-20 |        337        0.14       68.98
  24-Aug-20 |        337        0.14       69.12
  25-Aug-20 |        337        0.14       69.26
  26-Aug-20 |        337        0.14       69.40
  27-Aug-20 |        337        0.14       69.54
  28-Aug-20 |        337        0.14       69.68
  29-Aug-20 |        337        0.14       69.82
  30-Aug-20 |        337        0.14       69.96
  31-Aug-20 |        337        0.14       70.10
   1-Sep-20 |        337        0.14       70.24
   2-Sep-20 |        337        0.14       70.38
   3-Sep-20 |        337        0.14       70.51
   4-Sep-20 |        337        0.14       70.65
   5-Sep-20 |        337        0.14       70.79
   6-Sep-20 |        337        0.14       70.93
   7-Sep-20 |        337        0.14       71.07
   8-Sep-20 |        337        0.14       71.21
   9-Sep-20 |        337        0.14       71.35
  10-Sep-20 |        337        0.14       71.49
  11-Sep-20 |        337        0.14       71.63
  12-Sep-20 |        337        0.14       71.77
  13-Sep-20 |        337        0.14       71.91
  14-Sep-20 |        337        0.14       72.04
  15-Sep-20 |        337        0.14       72.18
  16-Sep-20 |        337        0.14       72.32
  17-Sep-20 |        337        0.14       72.46
  18-Sep-20 |        337        0.14       72.60
  19-Sep-20 |        337        0.14       72.74
  20-Sep-20 |        337        0.14       72.88
  21-Sep-20 |        337        0.14       73.02
  22-Sep-20 |        337        0.14       73.16
  23-Sep-20 |        337        0.14       73.30
  24-Sep-20 |        337        0.14       73.44
  25-Sep-20 |        337        0.14       73.57
  26-Sep-20 |        337        0.14       73.71
  27-Sep-20 |        337        0.14       73.85
  28-Sep-20 |        337        0.14       73.99
  29-Sep-20 |        337        0.14       74.13
  30-Sep-20 |        337        0.14       74.27
   1-Oct-20 |        337        0.14       74.41
   2-Oct-20 |        337        0.14       74.55
   3-Oct-20 |        337        0.14       74.69
   4-Oct-20 |        337        0.14       74.83
   5-Oct-20 |        337        0.14       74.97
   6-Oct-20 |        337        0.14       75.10
   7-Oct-20 |        337        0.14       75.24
   8-Oct-20 |        337        0.14       75.38
   9-Oct-20 |        337        0.14       75.52
  10-Oct-20 |        337        0.14       75.66
  11-Oct-20 |        337        0.14       75.80
  12-Oct-20 |        337        0.14       75.94
  13-Oct-20 |        337        0.14       76.08
  14-Oct-20 |        337        0.14       76.22
  15-Oct-20 |        337        0.14       76.36
  16-Oct-20 |        337        0.14       76.50
  17-Oct-20 |        337        0.14       76.63
  18-Oct-20 |        337        0.14       76.77
  19-Oct-20 |        337        0.14       76.91
  20-Oct-20 |        337        0.14       77.05
  21-Oct-20 |        337        0.14       77.19
  22-Oct-20 |        337        0.14       77.33
  23-Oct-20 |        337        0.14       77.47
  24-Oct-20 |        337        0.14       77.61
  25-Oct-20 |        337        0.14       77.75
  26-Oct-20 |        337        0.14       77.89
  27-Oct-20 |        337        0.14       78.03
  28-Oct-20 |        337        0.14       78.16
  29-Oct-20 |        337        0.14       78.30
  30-Oct-20 |        337        0.14       78.44
  31-Oct-20 |        337        0.14       78.58
   1-Nov-20 |        337        0.14       78.72
   2-Nov-20 |        337        0.14       78.86
   3-Nov-20 |        337        0.14       79.00
   4-Nov-20 |        337        0.14       79.14
   5-Nov-20 |        337        0.14       79.28
   6-Nov-20 |        337        0.14       79.42
   7-Nov-20 |        337        0.14       79.55
   8-Nov-20 |        337        0.14       79.69
   9-Nov-20 |        337        0.14       79.83
  10-Nov-20 |        337        0.14       79.97
  11-Nov-20 |        337        0.14       80.11
  12-Nov-20 |        337        0.14       80.25
  13-Nov-20 |        337        0.14       80.39
  14-Nov-20 |        337        0.14       80.53
  15-Nov-20 |        337        0.14       80.67
  16-Nov-20 |        337        0.14       80.81
  17-Nov-20 |        337        0.14       80.95
  18-Nov-20 |        337        0.14       81.08
  19-Nov-20 |        337        0.14       81.22
  20-Nov-20 |        337        0.14       81.36
  21-Nov-20 |        337        0.14       81.50
  22-Nov-20 |        337        0.14       81.64
  23-Nov-20 |        337        0.14       81.78
  24-Nov-20 |        337        0.14       81.92
  25-Nov-20 |        337        0.14       82.06
  26-Nov-20 |        337        0.14       82.20
  27-Nov-20 |        337        0.14       82.34
  28-Nov-20 |        337        0.14       82.48
  29-Nov-20 |        337        0.14       82.61
  30-Nov-20 |        337        0.14       82.75
   1-Dec-20 |        337        0.14       82.89
   2-Dec-20 |        337        0.14       83.03
   3-Dec-20 |        337        0.14       83.17
   4-Dec-20 |        337        0.14       83.31
   5-Dec-20 |        337        0.14       83.45
   6-Dec-20 |        337        0.14       83.59
   7-Dec-20 |        337        0.14       83.73
   8-Dec-20 |        337        0.14       83.87
   9-Dec-20 |        337        0.14       84.01
  10-Dec-20 |        337        0.14       84.14
  11-Dec-20 |        337        0.14       84.28
  12-Dec-20 |        337        0.14       84.42
  13-Dec-20 |        337        0.14       84.56
  14-Dec-20 |        337        0.14       84.70
  15-Dec-20 |        337        0.14       84.84
  16-Dec-20 |        337        0.14       84.98
  17-Dec-20 |        337        0.14       85.12
  18-Dec-20 |        337        0.14       85.26
  19-Dec-20 |        337        0.14       85.40
  20-Dec-20 |        337        0.14       85.54
  21-Dec-20 |        337        0.14       85.67
  22-Dec-20 |        337        0.14       85.81
  23-Dec-20 |        337        0.14       85.95
  24-Dec-20 |        337        0.14       86.09
  25-Dec-20 |        337        0.14       86.23
  26-Dec-20 |        337        0.14       86.37
  27-Dec-20 |        337        0.14       86.51
  28-Dec-20 |        337        0.14       86.65
  29-Dec-20 |        337        0.14       86.79
  30-Dec-20 |        337        0.14       86.93
  31-Dec-20 |        337        0.14       87.07
   1-Jan-21 |        337        0.14       87.20
   2-Jan-21 |        337        0.14       87.34
   3-Jan-21 |        337        0.14       87.48
   4-Jan-21 |        337        0.14       87.62
   5-Jan-21 |        337        0.14       87.76
   6-Jan-21 |        337        0.14       87.90
   7-Jan-21 |        337        0.14       88.04
   8-Jan-21 |        337        0.14       88.18
   9-Jan-21 |        337        0.14       88.32
  10-Jan-21 |        337        0.14       88.46
  11-Jan-21 |        337        0.14       88.60
  12-Jan-21 |        337        0.14       88.73
  13-Jan-21 |        337        0.14       88.87
  14-Jan-21 |        337        0.14       89.01
  15-Jan-21 |        337        0.14       89.15
  16-Jan-21 |        337        0.14       89.29
  17-Jan-21 |        337        0.14       89.43
  18-Jan-21 |        337        0.14       89.57
  19-Jan-21 |        337        0.14       89.71
  20-Jan-21 |        337        0.14       89.85
  21-Jan-21 |        337        0.14       89.99
  22-Jan-21 |        337        0.14       90.13
  23-Jan-21 |        337        0.14       90.26
  24-Jan-21 |        337        0.14       90.40
  25-Jan-21 |        337        0.14       90.54
  26-Jan-21 |        337        0.14       90.68
  27-Jan-21 |        337        0.14       90.82
  28-Jan-21 |        337        0.14       90.96
  29-Jan-21 |        337        0.14       91.10
  30-Jan-21 |        337        0.14       91.24
  31-Jan-21 |        337        0.14       91.38
   1-Feb-21 |        337        0.14       91.52
   2-Feb-21 |        337        0.14       91.66
   3-Feb-21 |        337        0.14       91.79
   4-Feb-21 |        337        0.14       91.93
   5-Feb-21 |        337        0.14       92.07
   6-Feb-21 |        337        0.14       92.21
   7-Feb-21 |        337        0.14       92.35
   8-Feb-21 |        337        0.14       92.49
   9-Feb-21 |        337        0.14       92.63
  10-Feb-21 |        337        0.14       92.77
  11-Feb-21 |        337        0.14       92.91
  12-Feb-21 |        337        0.14       93.05
  13-Feb-21 |        337        0.14       93.18
  14-Feb-21 |        337        0.14       93.32
  15-Feb-21 |        337        0.14       93.46
  16-Feb-21 |        337        0.14       93.60
  17-Feb-21 |        337        0.14       93.74
  18-Feb-21 |        337        0.14       93.88
  19-Feb-21 |        337        0.14       94.02
  20-Feb-21 |        337        0.14       94.16
  21-Feb-21 |        337        0.14       94.30
  22-Feb-21 |        337        0.14       94.44
  23-Feb-21 |        337        0.14       94.58
  24-Feb-21 |        337        0.14       94.71
  25-Feb-21 |        337        0.14       94.85
  26-Feb-21 |        337        0.14       94.99
  27-Feb-21 |        337        0.14       95.13
  28-Feb-21 |        337        0.14       95.27
   1-Mar-21 |        337        0.14       95.41
   2-Mar-21 |        337        0.14       95.55
   3-Mar-21 |        337        0.14       95.69
   4-Mar-21 |        337        0.14       95.83
   5-Mar-21 |        337        0.14       95.97
   6-Mar-21 |        337        0.14       96.11
   7-Mar-21 |        337        0.14       96.24
   8-Mar-21 |        337        0.14       96.38
   9-Mar-21 |        337        0.14       96.52
  10-Mar-21 |        337        0.14       96.66
  11-Mar-21 |        337        0.14       96.80
  12-Mar-21 |        337        0.14       96.94
  13-Mar-21 |        337        0.14       97.08
  14-Mar-21 |        337        0.14       97.22
  15-Mar-21 |        337        0.14       97.36
  16-Mar-21 |        337        0.14       97.50
  17-Mar-21 |        337        0.14       97.64
  18-Mar-21 |        337        0.14       97.77
  19-Mar-21 |        337        0.14       97.91
  20-Mar-21 |        337        0.14       98.05
  21-Mar-21 |        337        0.14       98.19
  22-Mar-21 |        337        0.14       98.33
  23-Mar-21 |        337        0.14       98.47
  24-Mar-21 |        337        0.14       98.61
  25-Mar-21 |        337        0.14       98.75
  26-Mar-21 |        337        0.14       98.89
  27-Mar-21 |        337        0.14       99.03
  28-Mar-21 |        337        0.14       99.17
  29-Mar-21 |        337        0.14       99.30
  30-Mar-21 |        337        0.14       99.44
  31-Mar-21 |        337        0.14       99.58
   1-Apr-21 |        337        0.14       99.72
   2-Apr-21 |        337        0.14       99.86
   3-Apr-21 |        337        0.14      100.00
------------+-----------------------------------
      Total |    242,303      100.00

. ** 242,303 Observations. 337 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ** Generate a week variable
. drop week

. gen int week = floor((date-td(31dec2018))/7)+1

. la var week "Week"

. 
. ** Generate a month variable which goes from the 16th of each month to the 15th of the next month. 
. ** This definition of month aligns with the implementation of ETS market in its initial Stages. 
. ** Nick Cox's code:
. drop month16

. gen month16 = date if day(date) == 16
(234,215 missing values generated)

. //      replace month16 = mdy(1, 16, 2019) in 1
. replace month16 = month16[_n-1] if missing(month16)
(234,215 real changes made)

. la var month16 "Month, defined as 16th of this month to 15th of next month"

. gen month16_sif = month16

. format month16 %tddd-Mon-YY

. la var month16_sif "[SIF] Month-year. For convenience."

. order month16_sif, a(month16)

. sort composite_id date

. ** Check days in each month for one device. Looks good.
. *tab month16 if composite_id == "GJSRT100740111"
. 
. ** Generate Dummy for Interregnum period of market 
. ** Covid lockdown -- 23 March 2020 to 11 October 2021. 
. ** Mock-III started on 12 October 2021.
. gen D_interregnum_week = week >= 65 & week <= 93

. replace D_interregnum_week =1 if week == 99 | week == 100
(4,718 real changes made)

. la var D_interregnum_week ///
>         "[Week-level] =1 if Interregnum due to Covid-19 lockdown, zero otherwise."

. 
. drop extinct_with_assignment removed_from_sample comment

. 
. ** Remove plants that have no observation from 16-Apr-19 to 03-Apr-21.
. bysort gpcb_id: egen pct_report = mean(!missing(pm_mass_rule0)) if ///
>         month16 >= date("2019jul16", "YMD") & D_interregnum_week == 0
(103,796 missing values generated)

. sort composite_id date

. bysort gpcb_id: egen pct_report_1 = mean(pct_report)

. drop if pct_report_1 == 0
(19,413 observations deleted)

. drop pct_report pct_report_1

. sort composite_id date  

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        310        0.14        0.14
  17-Apr-19 |        310        0.14        0.28
  18-Apr-19 |        310        0.14        0.42
  19-Apr-19 |        310        0.14        0.56
  20-Apr-19 |        310        0.14        0.70
  21-Apr-19 |        310        0.14        0.83
  22-Apr-19 |        310        0.14        0.97
  23-Apr-19 |        310        0.14        1.11
  24-Apr-19 |        310        0.14        1.25
  25-Apr-19 |        310        0.14        1.39
  26-Apr-19 |        310        0.14        1.53
  27-Apr-19 |        310        0.14        1.67
  28-Apr-19 |        310        0.14        1.81
  29-Apr-19 |        310        0.14        1.95
  30-Apr-19 |        310        0.14        2.09
   1-May-19 |        310        0.14        2.23
   2-May-19 |        310        0.14        2.36
   3-May-19 |        310        0.14        2.50
   4-May-19 |        310        0.14        2.64
   5-May-19 |        310        0.14        2.78
   6-May-19 |        310        0.14        2.92
   7-May-19 |        310        0.14        3.06
   8-May-19 |        310        0.14        3.20
   9-May-19 |        310        0.14        3.34
  10-May-19 |        310        0.14        3.48
  11-May-19 |        310        0.14        3.62
  12-May-19 |        310        0.14        3.76
  13-May-19 |        310        0.14        3.89
  14-May-19 |        310        0.14        4.03
  15-May-19 |        310        0.14        4.17
  16-May-19 |        310        0.14        4.31
  17-May-19 |        310        0.14        4.45
  18-May-19 |        310        0.14        4.59
  19-May-19 |        310        0.14        4.73
  20-May-19 |        310        0.14        4.87
  21-May-19 |        310        0.14        5.01
  22-May-19 |        310        0.14        5.15
  23-May-19 |        310        0.14        5.29
  24-May-19 |        310        0.14        5.42
  25-May-19 |        310        0.14        5.56
  26-May-19 |        310        0.14        5.70
  27-May-19 |        310        0.14        5.84
  28-May-19 |        310        0.14        5.98
  29-May-19 |        310        0.14        6.12
  30-May-19 |        310        0.14        6.26
  31-May-19 |        310        0.14        6.40
   1-Jun-19 |        310        0.14        6.54
   2-Jun-19 |        310        0.14        6.68
   3-Jun-19 |        310        0.14        6.82
   4-Jun-19 |        310        0.14        6.95
   5-Jun-19 |        310        0.14        7.09
   6-Jun-19 |        310        0.14        7.23
   7-Jun-19 |        310        0.14        7.37
   8-Jun-19 |        310        0.14        7.51
   9-Jun-19 |        310        0.14        7.65
  10-Jun-19 |        310        0.14        7.79
  11-Jun-19 |        310        0.14        7.93
  12-Jun-19 |        310        0.14        8.07
  13-Jun-19 |        310        0.14        8.21
  14-Jun-19 |        310        0.14        8.34
  15-Jun-19 |        310        0.14        8.48
  16-Jun-19 |        310        0.14        8.62
  17-Jun-19 |        310        0.14        8.76
  18-Jun-19 |        310        0.14        8.90
  19-Jun-19 |        310        0.14        9.04
  20-Jun-19 |        310        0.14        9.18
  21-Jun-19 |        310        0.14        9.32
  22-Jun-19 |        310        0.14        9.46
  23-Jun-19 |        310        0.14        9.60
  24-Jun-19 |        310        0.14        9.74
  25-Jun-19 |        310        0.14        9.87
  26-Jun-19 |        310        0.14       10.01
  27-Jun-19 |        310        0.14       10.15
  28-Jun-19 |        310        0.14       10.29
  29-Jun-19 |        310        0.14       10.43
  30-Jun-19 |        310        0.14       10.57
   1-Jul-19 |        310        0.14       10.71
   2-Jul-19 |        310        0.14       10.85
   3-Jul-19 |        310        0.14       10.99
   4-Jul-19 |        310        0.14       11.13
   5-Jul-19 |        310        0.14       11.27
   6-Jul-19 |        310        0.14       11.40
   7-Jul-19 |        310        0.14       11.54
   8-Jul-19 |        310        0.14       11.68
   9-Jul-19 |        310        0.14       11.82
  10-Jul-19 |        310        0.14       11.96
  11-Jul-19 |        310        0.14       12.10
  12-Jul-19 |        310        0.14       12.24
  13-Jul-19 |        310        0.14       12.38
  14-Jul-19 |        310        0.14       12.52
  15-Jul-19 |        310        0.14       12.66
  16-Jul-19 |        310        0.14       12.80
  17-Jul-19 |        310        0.14       12.93
  18-Jul-19 |        310        0.14       13.07
  19-Jul-19 |        310        0.14       13.21
  20-Jul-19 |        310        0.14       13.35
  21-Jul-19 |        310        0.14       13.49
  22-Jul-19 |        310        0.14       13.63
  23-Jul-19 |        310        0.14       13.77
  24-Jul-19 |        310        0.14       13.91
  25-Jul-19 |        310        0.14       14.05
  26-Jul-19 |        310        0.14       14.19
  27-Jul-19 |        310        0.14       14.33
  28-Jul-19 |        310        0.14       14.46
  29-Jul-19 |        310        0.14       14.60
  30-Jul-19 |        310        0.14       14.74
  31-Jul-19 |        310        0.14       14.88
   1-Aug-19 |        310        0.14       15.02
   2-Aug-19 |        310        0.14       15.16
   3-Aug-19 |        310        0.14       15.30
   4-Aug-19 |        310        0.14       15.44
   5-Aug-19 |        310        0.14       15.58
   6-Aug-19 |        310        0.14       15.72
   7-Aug-19 |        310        0.14       15.86
   8-Aug-19 |        310        0.14       15.99
   9-Aug-19 |        310        0.14       16.13
  10-Aug-19 |        310        0.14       16.27
  11-Aug-19 |        310        0.14       16.41
  12-Aug-19 |        310        0.14       16.55
  13-Aug-19 |        310        0.14       16.69
  14-Aug-19 |        310        0.14       16.83
  15-Aug-19 |        310        0.14       16.97
  16-Aug-19 |        310        0.14       17.11
  17-Aug-19 |        310        0.14       17.25
  18-Aug-19 |        310        0.14       17.39
  19-Aug-19 |        310        0.14       17.52
  20-Aug-19 |        310        0.14       17.66
  21-Aug-19 |        310        0.14       17.80
  22-Aug-19 |        310        0.14       17.94
  23-Aug-19 |        310        0.14       18.08
  24-Aug-19 |        310        0.14       18.22
  25-Aug-19 |        310        0.14       18.36
  26-Aug-19 |        310        0.14       18.50
  27-Aug-19 |        310        0.14       18.64
  28-Aug-19 |        310        0.14       18.78
  29-Aug-19 |        310        0.14       18.92
  30-Aug-19 |        310        0.14       19.05
  31-Aug-19 |        310        0.14       19.19
   1-Sep-19 |        310        0.14       19.33
   2-Sep-19 |        310        0.14       19.47
   3-Sep-19 |        310        0.14       19.61
   4-Sep-19 |        310        0.14       19.75
   5-Sep-19 |        310        0.14       19.89
   6-Sep-19 |        310        0.14       20.03
   7-Sep-19 |        310        0.14       20.17
   8-Sep-19 |        310        0.14       20.31
   9-Sep-19 |        310        0.14       20.45
  10-Sep-19 |        310        0.14       20.58
  11-Sep-19 |        310        0.14       20.72
  12-Sep-19 |        310        0.14       20.86
  13-Sep-19 |        310        0.14       21.00
  14-Sep-19 |        310        0.14       21.14
  15-Sep-19 |        310        0.14       21.28
  16-Sep-19 |        310        0.14       21.42
  17-Sep-19 |        310        0.14       21.56
  18-Sep-19 |        310        0.14       21.70
  19-Sep-19 |        310        0.14       21.84
  20-Sep-19 |        310        0.14       21.97
  21-Sep-19 |        310        0.14       22.11
  22-Sep-19 |        310        0.14       22.25
  23-Sep-19 |        310        0.14       22.39
  24-Sep-19 |        310        0.14       22.53
  25-Sep-19 |        310        0.14       22.67
  26-Sep-19 |        310        0.14       22.81
  27-Sep-19 |        310        0.14       22.95
  28-Sep-19 |        310        0.14       23.09
  29-Sep-19 |        310        0.14       23.23
  30-Sep-19 |        310        0.14       23.37
   1-Oct-19 |        310        0.14       23.50
   2-Oct-19 |        310        0.14       23.64
   3-Oct-19 |        310        0.14       23.78
   4-Oct-19 |        310        0.14       23.92
   5-Oct-19 |        310        0.14       24.06
   6-Oct-19 |        310        0.14       24.20
   7-Oct-19 |        310        0.14       24.34
   8-Oct-19 |        310        0.14       24.48
   9-Oct-19 |        310        0.14       24.62
  10-Oct-19 |        310        0.14       24.76
  11-Oct-19 |        310        0.14       24.90
  12-Oct-19 |        310        0.14       25.03
  13-Oct-19 |        310        0.14       25.17
  14-Oct-19 |        310        0.14       25.31
  15-Oct-19 |        310        0.14       25.45
  16-Oct-19 |        310        0.14       25.59
  17-Oct-19 |        310        0.14       25.73
  18-Oct-19 |        310        0.14       25.87
  19-Oct-19 |        310        0.14       26.01
  20-Oct-19 |        310        0.14       26.15
  21-Oct-19 |        310        0.14       26.29
  22-Oct-19 |        310        0.14       26.43
  23-Oct-19 |        310        0.14       26.56
  24-Oct-19 |        310        0.14       26.70
  25-Oct-19 |        310        0.14       26.84
  26-Oct-19 |        310        0.14       26.98
  27-Oct-19 |        310        0.14       27.12
  28-Oct-19 |        310        0.14       27.26
  29-Oct-19 |        310        0.14       27.40
  30-Oct-19 |        310        0.14       27.54
  31-Oct-19 |        310        0.14       27.68
   1-Nov-19 |        310        0.14       27.82
   2-Nov-19 |        310        0.14       27.96
   3-Nov-19 |        310        0.14       28.09
   4-Nov-19 |        310        0.14       28.23
   5-Nov-19 |        310        0.14       28.37
   6-Nov-19 |        310        0.14       28.51
   7-Nov-19 |        310        0.14       28.65
   8-Nov-19 |        310        0.14       28.79
   9-Nov-19 |        310        0.14       28.93
  10-Nov-19 |        310        0.14       29.07
  11-Nov-19 |        310        0.14       29.21
  12-Nov-19 |        310        0.14       29.35
  13-Nov-19 |        310        0.14       29.49
  14-Nov-19 |        310        0.14       29.62
  15-Nov-19 |        310        0.14       29.76
  16-Nov-19 |        310        0.14       29.90
  17-Nov-19 |        310        0.14       30.04
  18-Nov-19 |        310        0.14       30.18
  19-Nov-19 |        310        0.14       30.32
  20-Nov-19 |        310        0.14       30.46
  21-Nov-19 |        310        0.14       30.60
  22-Nov-19 |        310        0.14       30.74
  23-Nov-19 |        310        0.14       30.88
  24-Nov-19 |        310        0.14       31.02
  25-Nov-19 |        310        0.14       31.15
  26-Nov-19 |        310        0.14       31.29
  27-Nov-19 |        310        0.14       31.43
  28-Nov-19 |        310        0.14       31.57
  29-Nov-19 |        310        0.14       31.71
  30-Nov-19 |        310        0.14       31.85
   1-Dec-19 |        310        0.14       31.99
   2-Dec-19 |        310        0.14       32.13
   3-Dec-19 |        310        0.14       32.27
   4-Dec-19 |        310        0.14       32.41
   5-Dec-19 |        310        0.14       32.55
   6-Dec-19 |        310        0.14       32.68
   7-Dec-19 |        310        0.14       32.82
   8-Dec-19 |        310        0.14       32.96
   9-Dec-19 |        310        0.14       33.10
  10-Dec-19 |        310        0.14       33.24
  11-Dec-19 |        310        0.14       33.38
  12-Dec-19 |        310        0.14       33.52
  13-Dec-19 |        310        0.14       33.66
  14-Dec-19 |        310        0.14       33.80
  15-Dec-19 |        310        0.14       33.94
  16-Dec-19 |        310        0.14       34.08
  17-Dec-19 |        310        0.14       34.21
  18-Dec-19 |        310        0.14       34.35
  19-Dec-19 |        310        0.14       34.49
  20-Dec-19 |        310        0.14       34.63
  21-Dec-19 |        310        0.14       34.77
  22-Dec-19 |        310        0.14       34.91
  23-Dec-19 |        310        0.14       35.05
  24-Dec-19 |        310        0.14       35.19
  25-Dec-19 |        310        0.14       35.33
  26-Dec-19 |        310        0.14       35.47
  27-Dec-19 |        310        0.14       35.61
  28-Dec-19 |        310        0.14       35.74
  29-Dec-19 |        310        0.14       35.88
  30-Dec-19 |        310        0.14       36.02
  31-Dec-19 |        310        0.14       36.16
   1-Jan-20 |        310        0.14       36.30
   2-Jan-20 |        310        0.14       36.44
   3-Jan-20 |        310        0.14       36.58
   4-Jan-20 |        310        0.14       36.72
   5-Jan-20 |        310        0.14       36.86
   6-Jan-20 |        310        0.14       37.00
   7-Jan-20 |        310        0.14       37.13
   8-Jan-20 |        310        0.14       37.27
   9-Jan-20 |        310        0.14       37.41
  10-Jan-20 |        310        0.14       37.55
  11-Jan-20 |        310        0.14       37.69
  12-Jan-20 |        310        0.14       37.83
  13-Jan-20 |        310        0.14       37.97
  14-Jan-20 |        310        0.14       38.11
  15-Jan-20 |        310        0.14       38.25
  16-Jan-20 |        310        0.14       38.39
  17-Jan-20 |        310        0.14       38.53
  18-Jan-20 |        310        0.14       38.66
  19-Jan-20 |        310        0.14       38.80
  20-Jan-20 |        310        0.14       38.94
  21-Jan-20 |        310        0.14       39.08
  22-Jan-20 |        310        0.14       39.22
  23-Jan-20 |        310        0.14       39.36
  24-Jan-20 |        310        0.14       39.50
  25-Jan-20 |        310        0.14       39.64
  26-Jan-20 |        310        0.14       39.78
  27-Jan-20 |        310        0.14       39.92
  28-Jan-20 |        310        0.14       40.06
  29-Jan-20 |        310        0.14       40.19
  30-Jan-20 |        310        0.14       40.33
  31-Jan-20 |        310        0.14       40.47
   1-Feb-20 |        310        0.14       40.61
   2-Feb-20 |        310        0.14       40.75
   3-Feb-20 |        310        0.14       40.89
   4-Feb-20 |        310        0.14       41.03
   5-Feb-20 |        310        0.14       41.17
   6-Feb-20 |        310        0.14       41.31
   7-Feb-20 |        310        0.14       41.45
   8-Feb-20 |        310        0.14       41.59
   9-Feb-20 |        310        0.14       41.72
  10-Feb-20 |        310        0.14       41.86
  11-Feb-20 |        310        0.14       42.00
  12-Feb-20 |        310        0.14       42.14
  13-Feb-20 |        310        0.14       42.28
  14-Feb-20 |        310        0.14       42.42
  15-Feb-20 |        310        0.14       42.56
  16-Feb-20 |        310        0.14       42.70
  17-Feb-20 |        310        0.14       42.84
  18-Feb-20 |        310        0.14       42.98
  19-Feb-20 |        310        0.14       43.12
  20-Feb-20 |        310        0.14       43.25
  21-Feb-20 |        310        0.14       43.39
  22-Feb-20 |        310        0.14       43.53
  23-Feb-20 |        310        0.14       43.67
  24-Feb-20 |        310        0.14       43.81
  25-Feb-20 |        310        0.14       43.95
  26-Feb-20 |        310        0.14       44.09
  27-Feb-20 |        310        0.14       44.23
  28-Feb-20 |        310        0.14       44.37
  29-Feb-20 |        310        0.14       44.51
   1-Mar-20 |        310        0.14       44.65
   2-Mar-20 |        310        0.14       44.78
   3-Mar-20 |        310        0.14       44.92
   4-Mar-20 |        310        0.14       45.06
   5-Mar-20 |        310        0.14       45.20
   6-Mar-20 |        310        0.14       45.34
   7-Mar-20 |        310        0.14       45.48
   8-Mar-20 |        310        0.14       45.62
   9-Mar-20 |        310        0.14       45.76
  10-Mar-20 |        310        0.14       45.90
  11-Mar-20 |        310        0.14       46.04
  12-Mar-20 |        310        0.14       46.18
  13-Mar-20 |        310        0.14       46.31
  14-Mar-20 |        310        0.14       46.45
  15-Mar-20 |        310        0.14       46.59
  16-Mar-20 |        310        0.14       46.73
  17-Mar-20 |        310        0.14       46.87
  18-Mar-20 |        310        0.14       47.01
  19-Mar-20 |        310        0.14       47.15
  20-Mar-20 |        310        0.14       47.29
  21-Mar-20 |        310        0.14       47.43
  22-Mar-20 |        310        0.14       47.57
  23-Mar-20 |        310        0.14       47.71
  24-Mar-20 |        310        0.14       47.84
  25-Mar-20 |        310        0.14       47.98
  26-Mar-20 |        310        0.14       48.12
  27-Mar-20 |        310        0.14       48.26
  28-Mar-20 |        310        0.14       48.40
  29-Mar-20 |        310        0.14       48.54
  30-Mar-20 |        310        0.14       48.68
  31-Mar-20 |        310        0.14       48.82
   1-Apr-20 |        310        0.14       48.96
   2-Apr-20 |        310        0.14       49.10
   3-Apr-20 |        310        0.14       49.24
   4-Apr-20 |        310        0.14       49.37
   5-Apr-20 |        310        0.14       49.51
   6-Apr-20 |        310        0.14       49.65
   7-Apr-20 |        310        0.14       49.79
   8-Apr-20 |        310        0.14       49.93
   9-Apr-20 |        310        0.14       50.07
  10-Apr-20 |        310        0.14       50.21
  11-Apr-20 |        310        0.14       50.35
  12-Apr-20 |        310        0.14       50.49
  13-Apr-20 |        310        0.14       50.63
  14-Apr-20 |        310        0.14       50.76
  15-Apr-20 |        310        0.14       50.90
  16-Apr-20 |        310        0.14       51.04
  17-Apr-20 |        310        0.14       51.18
  18-Apr-20 |        310        0.14       51.32
  19-Apr-20 |        310        0.14       51.46
  20-Apr-20 |        310        0.14       51.60
  21-Apr-20 |        310        0.14       51.74
  22-Apr-20 |        310        0.14       51.88
  23-Apr-20 |        310        0.14       52.02
  24-Apr-20 |        310        0.14       52.16
  25-Apr-20 |        310        0.14       52.29
  26-Apr-20 |        310        0.14       52.43
  27-Apr-20 |        310        0.14       52.57
  28-Apr-20 |        310        0.14       52.71
  29-Apr-20 |        310        0.14       52.85
  30-Apr-20 |        310        0.14       52.99
   1-May-20 |        310        0.14       53.13
   2-May-20 |        310        0.14       53.27
   3-May-20 |        310        0.14       53.41
   4-May-20 |        310        0.14       53.55
   5-May-20 |        310        0.14       53.69
   6-May-20 |        310        0.14       53.82
   7-May-20 |        310        0.14       53.96
   8-May-20 |        310        0.14       54.10
   9-May-20 |        310        0.14       54.24
  10-May-20 |        310        0.14       54.38
  11-May-20 |        310        0.14       54.52
  12-May-20 |        310        0.14       54.66
  13-May-20 |        310        0.14       54.80
  14-May-20 |        310        0.14       54.94
  15-May-20 |        310        0.14       55.08
  16-May-20 |        310        0.14       55.22
  17-May-20 |        310        0.14       55.35
  18-May-20 |        310        0.14       55.49
  19-May-20 |        310        0.14       55.63
  20-May-20 |        310        0.14       55.77
  21-May-20 |        310        0.14       55.91
  22-May-20 |        310        0.14       56.05
  23-May-20 |        310        0.14       56.19
  24-May-20 |        310        0.14       56.33
  25-May-20 |        310        0.14       56.47
  26-May-20 |        310        0.14       56.61
  27-May-20 |        310        0.14       56.75
  28-May-20 |        310        0.14       56.88
  29-May-20 |        310        0.14       57.02
  30-May-20 |        310        0.14       57.16
  31-May-20 |        310        0.14       57.30
   1-Jun-20 |        310        0.14       57.44
   2-Jun-20 |        310        0.14       57.58
   3-Jun-20 |        310        0.14       57.72
   4-Jun-20 |        310        0.14       57.86
   5-Jun-20 |        310        0.14       58.00
   6-Jun-20 |        310        0.14       58.14
   7-Jun-20 |        310        0.14       58.28
   8-Jun-20 |        310        0.14       58.41
   9-Jun-20 |        310        0.14       58.55
  10-Jun-20 |        310        0.14       58.69
  11-Jun-20 |        310        0.14       58.83
  12-Jun-20 |        310        0.14       58.97
  13-Jun-20 |        310        0.14       59.11
  14-Jun-20 |        310        0.14       59.25
  15-Jun-20 |        310        0.14       59.39
  16-Jun-20 |        310        0.14       59.53
  17-Jun-20 |        310        0.14       59.67
  18-Jun-20 |        310        0.14       59.81
  19-Jun-20 |        310        0.14       59.94
  20-Jun-20 |        310        0.14       60.08
  21-Jun-20 |        310        0.14       60.22
  22-Jun-20 |        310        0.14       60.36
  23-Jun-20 |        310        0.14       60.50
  24-Jun-20 |        310        0.14       60.64
  25-Jun-20 |        310        0.14       60.78
  26-Jun-20 |        310        0.14       60.92
  27-Jun-20 |        310        0.14       61.06
  28-Jun-20 |        310        0.14       61.20
  29-Jun-20 |        310        0.14       61.34
  30-Jun-20 |        310        0.14       61.47
   1-Jul-20 |        310        0.14       61.61
   2-Jul-20 |        310        0.14       61.75
   3-Jul-20 |        310        0.14       61.89
   4-Jul-20 |        310        0.14       62.03
   5-Jul-20 |        310        0.14       62.17
   6-Jul-20 |        310        0.14       62.31
   7-Jul-20 |        310        0.14       62.45
   8-Jul-20 |        310        0.14       62.59
   9-Jul-20 |        310        0.14       62.73
  10-Jul-20 |        310        0.14       62.87
  11-Jul-20 |        310        0.14       63.00
  12-Jul-20 |        310        0.14       63.14
  13-Jul-20 |        310        0.14       63.28
  14-Jul-20 |        310        0.14       63.42
  15-Jul-20 |        310        0.14       63.56
  16-Jul-20 |        310        0.14       63.70
  17-Jul-20 |        310        0.14       63.84
  18-Jul-20 |        310        0.14       63.98
  19-Jul-20 |        310        0.14       64.12
  20-Jul-20 |        310        0.14       64.26
  21-Jul-20 |        310        0.14       64.39
  22-Jul-20 |        310        0.14       64.53
  23-Jul-20 |        310        0.14       64.67
  24-Jul-20 |        310        0.14       64.81
  25-Jul-20 |        310        0.14       64.95
  26-Jul-20 |        310        0.14       65.09
  27-Jul-20 |        310        0.14       65.23
  28-Jul-20 |        310        0.14       65.37
  29-Jul-20 |        310        0.14       65.51
  30-Jul-20 |        310        0.14       65.65
  31-Jul-20 |        310        0.14       65.79
   1-Aug-20 |        310        0.14       65.92
   2-Aug-20 |        310        0.14       66.06
   3-Aug-20 |        310        0.14       66.20
   4-Aug-20 |        310        0.14       66.34
   5-Aug-20 |        310        0.14       66.48
   6-Aug-20 |        310        0.14       66.62
   7-Aug-20 |        310        0.14       66.76
   8-Aug-20 |        310        0.14       66.90
   9-Aug-20 |        310        0.14       67.04
  10-Aug-20 |        310        0.14       67.18
  11-Aug-20 |        310        0.14       67.32
  12-Aug-20 |        310        0.14       67.45
  13-Aug-20 |        310        0.14       67.59
  14-Aug-20 |        310        0.14       67.73
  15-Aug-20 |        310        0.14       67.87
  16-Aug-20 |        310        0.14       68.01
  17-Aug-20 |        310        0.14       68.15
  18-Aug-20 |        310        0.14       68.29
  19-Aug-20 |        310        0.14       68.43
  20-Aug-20 |        310        0.14       68.57
  21-Aug-20 |        310        0.14       68.71
  22-Aug-20 |        310        0.14       68.85
  23-Aug-20 |        310        0.14       68.98
  24-Aug-20 |        310        0.14       69.12
  25-Aug-20 |        310        0.14       69.26
  26-Aug-20 |        310        0.14       69.40
  27-Aug-20 |        310        0.14       69.54
  28-Aug-20 |        310        0.14       69.68
  29-Aug-20 |        310        0.14       69.82
  30-Aug-20 |        310        0.14       69.96
  31-Aug-20 |        310        0.14       70.10
   1-Sep-20 |        310        0.14       70.24
   2-Sep-20 |        310        0.14       70.38
   3-Sep-20 |        310        0.14       70.51
   4-Sep-20 |        310        0.14       70.65
   5-Sep-20 |        310        0.14       70.79
   6-Sep-20 |        310        0.14       70.93
   7-Sep-20 |        310        0.14       71.07
   8-Sep-20 |        310        0.14       71.21
   9-Sep-20 |        310        0.14       71.35
  10-Sep-20 |        310        0.14       71.49
  11-Sep-20 |        310        0.14       71.63
  12-Sep-20 |        310        0.14       71.77
  13-Sep-20 |        310        0.14       71.91
  14-Sep-20 |        310        0.14       72.04
  15-Sep-20 |        310        0.14       72.18
  16-Sep-20 |        310        0.14       72.32
  17-Sep-20 |        310        0.14       72.46
  18-Sep-20 |        310        0.14       72.60
  19-Sep-20 |        310        0.14       72.74
  20-Sep-20 |        310        0.14       72.88
  21-Sep-20 |        310        0.14       73.02
  22-Sep-20 |        310        0.14       73.16
  23-Sep-20 |        310        0.14       73.30
  24-Sep-20 |        310        0.14       73.44
  25-Sep-20 |        310        0.14       73.57
  26-Sep-20 |        310        0.14       73.71
  27-Sep-20 |        310        0.14       73.85
  28-Sep-20 |        310        0.14       73.99
  29-Sep-20 |        310        0.14       74.13
  30-Sep-20 |        310        0.14       74.27
   1-Oct-20 |        310        0.14       74.41
   2-Oct-20 |        310        0.14       74.55
   3-Oct-20 |        310        0.14       74.69
   4-Oct-20 |        310        0.14       74.83
   5-Oct-20 |        310        0.14       74.97
   6-Oct-20 |        310        0.14       75.10
   7-Oct-20 |        310        0.14       75.24
   8-Oct-20 |        310        0.14       75.38
   9-Oct-20 |        310        0.14       75.52
  10-Oct-20 |        310        0.14       75.66
  11-Oct-20 |        310        0.14       75.80
  12-Oct-20 |        310        0.14       75.94
  13-Oct-20 |        310        0.14       76.08
  14-Oct-20 |        310        0.14       76.22
  15-Oct-20 |        310        0.14       76.36
  16-Oct-20 |        310        0.14       76.50
  17-Oct-20 |        310        0.14       76.63
  18-Oct-20 |        310        0.14       76.77
  19-Oct-20 |        310        0.14       76.91
  20-Oct-20 |        310        0.14       77.05
  21-Oct-20 |        310        0.14       77.19
  22-Oct-20 |        310        0.14       77.33
  23-Oct-20 |        310        0.14       77.47
  24-Oct-20 |        310        0.14       77.61
  25-Oct-20 |        310        0.14       77.75
  26-Oct-20 |        310        0.14       77.89
  27-Oct-20 |        310        0.14       78.03
  28-Oct-20 |        310        0.14       78.16
  29-Oct-20 |        310        0.14       78.30
  30-Oct-20 |        310        0.14       78.44
  31-Oct-20 |        310        0.14       78.58
   1-Nov-20 |        310        0.14       78.72
   2-Nov-20 |        310        0.14       78.86
   3-Nov-20 |        310        0.14       79.00
   4-Nov-20 |        310        0.14       79.14
   5-Nov-20 |        310        0.14       79.28
   6-Nov-20 |        310        0.14       79.42
   7-Nov-20 |        310        0.14       79.55
   8-Nov-20 |        310        0.14       79.69
   9-Nov-20 |        310        0.14       79.83
  10-Nov-20 |        310        0.14       79.97
  11-Nov-20 |        310        0.14       80.11
  12-Nov-20 |        310        0.14       80.25
  13-Nov-20 |        310        0.14       80.39
  14-Nov-20 |        310        0.14       80.53
  15-Nov-20 |        310        0.14       80.67
  16-Nov-20 |        310        0.14       80.81
  17-Nov-20 |        310        0.14       80.95
  18-Nov-20 |        310        0.14       81.08
  19-Nov-20 |        310        0.14       81.22
  20-Nov-20 |        310        0.14       81.36
  21-Nov-20 |        310        0.14       81.50
  22-Nov-20 |        310        0.14       81.64
  23-Nov-20 |        310        0.14       81.78
  24-Nov-20 |        310        0.14       81.92
  25-Nov-20 |        310        0.14       82.06
  26-Nov-20 |        310        0.14       82.20
  27-Nov-20 |        310        0.14       82.34
  28-Nov-20 |        310        0.14       82.48
  29-Nov-20 |        310        0.14       82.61
  30-Nov-20 |        310        0.14       82.75
   1-Dec-20 |        310        0.14       82.89
   2-Dec-20 |        310        0.14       83.03
   3-Dec-20 |        310        0.14       83.17
   4-Dec-20 |        310        0.14       83.31
   5-Dec-20 |        310        0.14       83.45
   6-Dec-20 |        310        0.14       83.59
   7-Dec-20 |        310        0.14       83.73
   8-Dec-20 |        310        0.14       83.87
   9-Dec-20 |        310        0.14       84.01
  10-Dec-20 |        310        0.14       84.14
  11-Dec-20 |        310        0.14       84.28
  12-Dec-20 |        310        0.14       84.42
  13-Dec-20 |        310        0.14       84.56
  14-Dec-20 |        310        0.14       84.70
  15-Dec-20 |        310        0.14       84.84
  16-Dec-20 |        310        0.14       84.98
  17-Dec-20 |        310        0.14       85.12
  18-Dec-20 |        310        0.14       85.26
  19-Dec-20 |        310        0.14       85.40
  20-Dec-20 |        310        0.14       85.54
  21-Dec-20 |        310        0.14       85.67
  22-Dec-20 |        310        0.14       85.81
  23-Dec-20 |        310        0.14       85.95
  24-Dec-20 |        310        0.14       86.09
  25-Dec-20 |        310        0.14       86.23
  26-Dec-20 |        310        0.14       86.37
  27-Dec-20 |        310        0.14       86.51
  28-Dec-20 |        310        0.14       86.65
  29-Dec-20 |        310        0.14       86.79
  30-Dec-20 |        310        0.14       86.93
  31-Dec-20 |        310        0.14       87.07
   1-Jan-21 |        310        0.14       87.20
   2-Jan-21 |        310        0.14       87.34
   3-Jan-21 |        310        0.14       87.48
   4-Jan-21 |        310        0.14       87.62
   5-Jan-21 |        310        0.14       87.76
   6-Jan-21 |        310        0.14       87.90
   7-Jan-21 |        310        0.14       88.04
   8-Jan-21 |        310        0.14       88.18
   9-Jan-21 |        310        0.14       88.32
  10-Jan-21 |        310        0.14       88.46
  11-Jan-21 |        310        0.14       88.60
  12-Jan-21 |        310        0.14       88.73
  13-Jan-21 |        310        0.14       88.87
  14-Jan-21 |        310        0.14       89.01
  15-Jan-21 |        310        0.14       89.15
  16-Jan-21 |        310        0.14       89.29
  17-Jan-21 |        310        0.14       89.43
  18-Jan-21 |        310        0.14       89.57
  19-Jan-21 |        310        0.14       89.71
  20-Jan-21 |        310        0.14       89.85
  21-Jan-21 |        310        0.14       89.99
  22-Jan-21 |        310        0.14       90.13
  23-Jan-21 |        310        0.14       90.26
  24-Jan-21 |        310        0.14       90.40
  25-Jan-21 |        310        0.14       90.54
  26-Jan-21 |        310        0.14       90.68
  27-Jan-21 |        310        0.14       90.82
  28-Jan-21 |        310        0.14       90.96
  29-Jan-21 |        310        0.14       91.10
  30-Jan-21 |        310        0.14       91.24
  31-Jan-21 |        310        0.14       91.38
   1-Feb-21 |        310        0.14       91.52
   2-Feb-21 |        310        0.14       91.66
   3-Feb-21 |        310        0.14       91.79
   4-Feb-21 |        310        0.14       91.93
   5-Feb-21 |        310        0.14       92.07
   6-Feb-21 |        310        0.14       92.21
   7-Feb-21 |        310        0.14       92.35
   8-Feb-21 |        310        0.14       92.49
   9-Feb-21 |        310        0.14       92.63
  10-Feb-21 |        310        0.14       92.77
  11-Feb-21 |        310        0.14       92.91
  12-Feb-21 |        310        0.14       93.05
  13-Feb-21 |        310        0.14       93.18
  14-Feb-21 |        310        0.14       93.32
  15-Feb-21 |        310        0.14       93.46
  16-Feb-21 |        310        0.14       93.60
  17-Feb-21 |        310        0.14       93.74
  18-Feb-21 |        310        0.14       93.88
  19-Feb-21 |        310        0.14       94.02
  20-Feb-21 |        310        0.14       94.16
  21-Feb-21 |        310        0.14       94.30
  22-Feb-21 |        310        0.14       94.44
  23-Feb-21 |        310        0.14       94.58
  24-Feb-21 |        310        0.14       94.71
  25-Feb-21 |        310        0.14       94.85
  26-Feb-21 |        310        0.14       94.99
  27-Feb-21 |        310        0.14       95.13
  28-Feb-21 |        310        0.14       95.27
   1-Mar-21 |        310        0.14       95.41
   2-Mar-21 |        310        0.14       95.55
   3-Mar-21 |        310        0.14       95.69
   4-Mar-21 |        310        0.14       95.83
   5-Mar-21 |        310        0.14       95.97
   6-Mar-21 |        310        0.14       96.11
   7-Mar-21 |        310        0.14       96.24
   8-Mar-21 |        310        0.14       96.38
   9-Mar-21 |        310        0.14       96.52
  10-Mar-21 |        310        0.14       96.66
  11-Mar-21 |        310        0.14       96.80
  12-Mar-21 |        310        0.14       96.94
  13-Mar-21 |        310        0.14       97.08
  14-Mar-21 |        310        0.14       97.22
  15-Mar-21 |        310        0.14       97.36
  16-Mar-21 |        310        0.14       97.50
  17-Mar-21 |        310        0.14       97.64
  18-Mar-21 |        310        0.14       97.77
  19-Mar-21 |        310        0.14       97.91
  20-Mar-21 |        310        0.14       98.05
  21-Mar-21 |        310        0.14       98.19
  22-Mar-21 |        310        0.14       98.33
  23-Mar-21 |        310        0.14       98.47
  24-Mar-21 |        310        0.14       98.61
  25-Mar-21 |        310        0.14       98.75
  26-Mar-21 |        310        0.14       98.89
  27-Mar-21 |        310        0.14       99.03
  28-Mar-21 |        310        0.14       99.17
  29-Mar-21 |        310        0.14       99.30
  30-Mar-21 |        310        0.14       99.44
  31-Mar-21 |        310        0.14       99.58
   1-Apr-21 |        310        0.14       99.72
   2-Apr-21 |        310        0.14       99.86
   3-Apr-21 |        310        0.14      100.00
------------+-----------------------------------
      Total |    222,890      100.00

. ** 222,890 Observations. 310 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. gen period = 0

. ** Mock-I
. replace period = 0 if date >= td(15jul2019) 
(0 real changes made)

. ** Mock-II
. replace period = 0 if date >= td(13aug2019)
(0 real changes made)

. ** Comp-I
. replace period = 1 if date >= td(16sep2019)
(175,460 real changes made)

. ** Comp-II
. replace period = 2 if date >= td(16oct2019)
(166,160 real changes made)

. ** Comp-III
. replace period = 3 if date >= td(16nov2019)
(156,550 real changes made)

. ** Comp-IV
. replace period = 4 if date >= td(01jan2020)
(142,290 real changes made)

. ** Comp-V
. replace period = 5 if date >= td(01feb2020)
(132,680 real changes made)

. ** Comp-VI
. replace period = 6 if date >= td(01mar2020)
(123,690 real changes made)

. ** Interregnum-I
. replace period = 0 if date >= td(22mar2020)
(117,180 real changes made)

. ** Mock-III
. replace period = 0 if date >= td(12oct2020)
(0 real changes made)

. ** Interregnum-II
. replace period = 0 if date >= td(12nov2020)
(0 real changes made)

. ** Comp-VII
. replace period = 7 if date >= td(01dec2020)
(38,440 real changes made)

. ** Comp-VIII
. replace period = 8 if date >= td(01jan2021)
(28,830 real changes made)

. ** Comp-IX
. replace period = 9 if date >= td(01feb2021)
(19,220 real changes made)

. ** Comp-X
. replace period = 10 if date >= td(01mar2021)
(10,540 real changes made)

. 
. drop if date >=  td(01apr2021)
(930 observations deleted)

. 
. *tab period if composite_id == "GJSRT100740111"
. gen temp = 1

. bysort period: egen period_length = sum(temp) 

. replace period_length = period_length / 310 
(221,960 real changes made)

. drop temp

. 
. ********************************************************************************
. ********************* [1] CALCULATE ACTUAL STACK DAY MASS **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Replace tot_report_hrs to zero 
.         ** if the stack was not sending a valid caliberated stack-day kg/hr that day
.         gen tot_report_hrs_rule`i' = tot_report_hrs
  3.         replace tot_report_hrs_rule`i' = 0 if D_vctransmitting_rule`i' == 0 
  4.         label var tot_report_hrs_rule`i' /// 
>                 "[RE-LABELED] Stack-day VALID CALIBRATED Reporting Hours from CEMS - rule `i'"
  5. 
.         ** Calculate DAILY actual mass emissions using Cems Day Reporting Hours
.         gen stack_daily_mass_actual_rule`i' = pm_mass_rule`i' * tot_report_hrs_rule`i'
  6.         la var stack_daily_mass_actual_rule`i' ///
>                 "Stack-day Actual Mass Emissions (kg) from CEMS Reported Hours - rule `i'"
  7. 
. }
(13,799 real changes made)
(92,287 missing values generated)
(13,140 real changes made)
(91,628 missing values generated)
(51,614 real changes made)
(130,102 missing values generated)
(51,140 real changes made)
(129,628 missing values generated)
(71,887 real changes made)
(150,375 missing values generated)
(71,520 real changes made)
(150,008 missing values generated)
(60,805 real changes made)
(139,293 missing values generated)
(60,375 real changes made)
(138,863 missing values generated)
(30,192 real changes made)
(108,680 missing values generated)
(29,607 real changes made)
(108,095 missing values generated)

. 
. ********************************************************************************
. ***************** [2] DAILY NON-REPORTING HOURS FOR IMPUTATION *****************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate DAILY non-reporting hours for imputation
.         gen daily_nonreport_hrs_rule`i' = 24 - tot_report_hrs_rule`i'   
  3.         order daily_nonreport_hrs_rule`i', a(tot_report_hrs_rule`i')
  4.         la var daily_nonreport_hrs_rule`i' ///
>                 "Stack Daily NON-Reporting Hours - CEMS - rule `i'"
  5. 
. }

. 
. ********************************************************************************
. ********* [3] For Imp: GENERATE STACK'S OWN WEEK and MONTH MEAN KG/HR **********
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate stack's own week mean kg/hr for missing pm mass values
.         bysort composite_id week: egen week_mean_mass_rule`i' = mean(pm_mass_rule`i')
  3.         la var week_mean_mass_rule`i' "Stack Week Mean kg/hr - rule `i'"
  4. 
.         ** Calculate treatment group week mean kg/hr for stacks missing entire week of pm mass
.         bysort treatmentstatus period: egen group_period_mean_mass_rule`i' = mean(pm_mass_rule`i')
  5.         la var group_period_mean_mass_rule`i' "Treatment Arm period Mean kg/hr - rule `i'"
  6. 
. }
(77,577 missing values generated)
(77,038 missing values generated)
(119,197 missing values generated)
(118,820 missing values generated)
(141,323 missing values generated)
(141,099 missing values generated)
(129,488 missing values generated)
(129,167 missing values generated)
(95,938 missing values generated)
(95,484 missing values generated)

. 
. /*******************************************************************************
>            NOW READY FOR IMPUTATION RULE 1b.
>            THE IMPLEMENTATION OF THIS RULE WILL BE:
> 
>            1)   IMPUTE STACK'S OWN WEEK MEAN PM_MASS (KG/HR) FOR ALL MISSING VALUES
>            OF STACK DAY PM_MASS (KG/HR). 
>            2)   IF WEEK MEAN KG/HR IS MISSING, IMPUTE TREATMENT ARM (GROUP) MONTH 
>            MEAN PM_MASS (KG/HR)
>            3)   THE FINAL EMISSION QUANTITY IS:
> 
>            VALIDATED STACK MASS (KG) = 
>            ACTUAL STACK MASS (KG) USING CEMS REPORTED HOURS +
>            IMPUTED STACK MASS (KG) USING CEMS NON-REPORTED HOURS
>    ****************************************************************************/
. 
. 
. ********************************************************************************
. ******************** [4] CALCULATE DAILY STACK IMPUTED MASS ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate PER DAY imputed emissions
.         gen stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * week_mean_mass_rule`i'
  3.         replace stack_daily_mass_imp_rule`i' = daily_nonreport_hrs_rule`i' * group_period_mean_mass_rule`i' ///
>                 if week_mean_mass_rule`i' == .
  4.         la var stack_daily_mass_imp_rule`i' ///
>                 "Stack-day Imputed Mass Emissions (kg) from CEMS Non-Reported Hours - trunc rule `i'"
  5. 
.         ** Correct for week of Diwali 2019 when imputation should be zero.
.         replace stack_daily_mass_imp_rule`i' = 0 if ///
>                 date >= date("2019oct26", "YMD") & ///
>                 date <= date("2019nov03", "YMD") & ///
>                 stack_daily_mass_imp_rule`i' != .
  6. 
. }
(77,577 missing values generated)
(77,577 real changes made)
note: label truncated to 80 characters
(1,899 real changes made)
(77,038 missing values generated)
(77,038 real changes made)
note: label truncated to 80 characters
(1,887 real changes made)
(119,197 missing values generated)
(119,197 real changes made)
note: label truncated to 80 characters
(2,148 real changes made)
(118,820 missing values generated)
(118,820 real changes made)
note: label truncated to 80 characters
(2,143 real changes made)
(141,323 missing values generated)
(141,323 real changes made)
note: label truncated to 80 characters
(2,344 real changes made)
(141,099 missing values generated)
(141,099 real changes made)
note: label truncated to 80 characters
(2,339 real changes made)
(129,488 missing values generated)
(129,488 real changes made)
note: label truncated to 80 characters
(2,236 real changes made)
(129,167 missing values generated)
(129,167 real changes made)
note: label truncated to 80 characters
(2,231 real changes made)
(95,938 missing values generated)
(95,938 real changes made)
note: label truncated to 80 characters
(2,002 real changes made)
(95,484 missing values generated)
(95,484 real changes made)
note: label truncated to 80 characters
(1,991 real changes made)

. 
. ********************************************************************************
. ******************* [5] CALCULATE DAILY STACK VALIDATED MASS *******************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         ** Calculate validated DAY emissions per stack
.         gen stack_daily_mass_val_rule`i' = stack_daily_mass_actual_rule`i' + stack_daily_mass_imp_rule`i'
  3.         replace stack_daily_mass_val_rule`i' = stack_daily_mass_imp_rule`i' ///
>                 if stack_daily_mass_val_rule`i' == .
  4.         la var stack_daily_mass_val_rule`i' ///
>                 "Stack-day Validated Mass Emissions (kg) (=Stack-day Actual + Stack-day Imp) - trunc rule `i'"
  5. 
. }
(92,287 missing values generated)
(92,287 real changes made)
note: label truncated to 80 characters
(91,628 missing values generated)
(91,628 real changes made)
note: label truncated to 80 characters
(130,102 missing values generated)
(130,102 real changes made)
note: label truncated to 80 characters
(129,628 missing values generated)
(129,628 real changes made)
note: label truncated to 80 characters
(150,375 missing values generated)
(150,375 real changes made)
note: label truncated to 80 characters
(150,008 missing values generated)
(150,008 real changes made)
note: label truncated to 80 characters
(139,293 missing values generated)
(139,293 real changes made)
note: label truncated to 80 characters
(138,863 missing values generated)
(138,863 real changes made)
note: label truncated to 80 characters
(108,680 missing values generated)
(108,680 real changes made)
note: label truncated to 80 characters
(108,095 missing values generated)
(108,095 real changes made)
note: label truncated to 80 characters

. 
. /*******************************************************************************
>            NOW READY TO MAKE THE DEPENDENT VARIABLE FOR REGRESSIONS IN PART 6 
>            (6. TREATMENT EFFECT ANALYSIS). THIS VAR IS PLANT MONTH MASS (KG).
> 
>            STEPS TO CREATE THIS VARIABLE WILL BE:
> 
>            6.1) CALCULATE STACK MONTH MASS (KG), AND THEN PLANT MONTH MASS (KG).
>            FIRST GENERATE THESE VARIABLES IN THE STACK-DAY LEVEL DATA SET 
>            AND SAVE IT FOR FUTURE USE IF NEEDED ("_StackDayLevel.dta").
> 
>            6.2) THEN, COLLAPSE THE STACK-DAY LEVEL DATA SET TO KEEP ONE DATA POINT 
>            PER PLANT PER MONTH ("_PlantMonthLevel.dta"). 
> 
>            CONTAINS THE DEPENDENT VARIABLE: PLANT-MONTH MASS (KG) EMISSIONS 
>            USING IMPUTATION RULE 1a.
>    ****************************************************************************/
. 
. preserve

.    
. ********************************************************************************
. ********************* [6.1] GENERATE STACK-MONTH MASS (KG) *********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER STACK
.         bysort composite_id period: egen stack_period_mass_val_rule`i' = sum(stack_daily_mass_val_rule`i')
  3.         bysort composite_id period: egen miss_stack_period_mass_val = max(missing(stack_daily_mass_val_rule`i'))
  4.         replace stack_period_mass_val_rule`i' = . if miss_stack_period_mass_val == 1
  5.         la var stack_period_mass_val_rule`i' ///
>                 "Stack-period Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_stack_period_mass_val
  7. 
. }
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id period: gen dump=_n

. bysort composite_id period: keep if _n==_N      
(218,550 observations deleted)

. keep composite_id industry_id gpcb_id period period_length treatmentstatus stack_period_mass_val* 

. ** 3,410 observations. 310 stacks. 11 periods.
. 
. 
. ********************************************************************************
. ******************** [6.2] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. ********************************************************************************
. 
. /**     AS PER NICK'S INSTRUCTION ON WEEKLY CALL 01 DEC 2020: FOR PLANTS WITH >1 STACK, 
>            WE WILL ONLY CALCULATE THEIR PLANT MASS (KG) SUM IF ALL STACKS ARE CONNECTED. 
>            IF STACKS ARE PARTIALLY CONNECTED (i.e., ONLY 1 OF 3 STACKS CONNECTED), 
>    THE ENTIRE PLANT SUM WILL BE MISSING.        **/
. 
. forvalues i=0(1)9{
  2. 
.         ** Calculate MONTHLY validated emissions PER PLANT
.         bysort gpcb_id period: egen ind_period_mass_val_rule`i' = sum(stack_period_mass_val_rule`i')
  3.         bysort gpcb_id period: egen miss_ind_period_mass_val = max(missing(stack_period_mass_val_rule`i'))
  4.         replace ind_period_mass_val_rule`i' = . if miss_ind_period_mass_val == 1
  5.         la var ind_period_mass_val_rule`i' ///
>                 "Plant-month Validated Mass Emissions (kg) - rule `i'"
  6.         drop miss_ind_period_mass_val
  7. 
. }
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. 
. gen temp = 1

. bysort gpcb_id: egen num_stack = sum(temp)

. replace num_stack = num_stack / 16
(3,410 real changes made)

. drop temp

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id period: gen dump=_n

. bysort gpcb_id period: keep if _n==_N
(198 observations deleted)

. keep industry_id gpcb_id period period_length treatmentstatus num_stack ind_period_mass_val* 

. keep if period > 0
(292 observations deleted)

. ** 2,920 observations. 292 plants. 16 periods.
. 
. save "$IMPUTATION_DATA_OUT/PlantPeriodPMMassRuleB.dta", replace
(file 02DataPipeline/emissions/imputation/PlantPeriodPMMassRuleB.dta not found)
file 02DataPipeline/emissions/imputation/PlantPeriodPMMassRuleB.dta saved

. 
. restore

. 
end of do-file

. do "$CODE_DIR/imputation/6. Create PM Mass (MOC Rule).do"

. /*******************************************************************************
>            Author:      Neil Himwich
>            Project: ETS
>            Purpose: Create PLANT-MONTH, PLANT-WEEK, PLANT-DAY, PLANT-PERIOD KG
>            EMISSIONS, using the MOC IMPUTATION RULE (ie the penalization system
>            used in market). Save these as rule "M" for "MOC"
>            
>            Note: This adapted the code found in this directory from other
>            imputation rules, and from the archive for the MOC imputation rule
> 
>            Date created: 4 March 2024
>            Version: STATA 18 MP
>            
>            Edited by: Noah Sobel-Lewin 
>            Date: 22 August 2024
>    ****************************************************************************/
. 
. 
. set more off

. clear all

. pause on

. 
. *-------------------------------------------------------------------------------
. 
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. drop if date < date("2019jan16", "YMD")
(0 observations deleted)

. format date %tddd-Mon-YY

. sort date composite_id

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        337        0.14        0.14
  17-Apr-19 |        337        0.14        0.28
  18-Apr-19 |        337        0.14        0.42
  19-Apr-19 |        337        0.14        0.56
  20-Apr-19 |        337        0.14        0.70
  21-Apr-19 |        337        0.14        0.83
  22-Apr-19 |        337        0.14        0.97
  23-Apr-19 |        337        0.14        1.11
  24-Apr-19 |        337        0.14        1.25
  25-Apr-19 |        337        0.14        1.39
  26-Apr-19 |        337        0.14        1.53
  27-Apr-19 |        337        0.14        1.67
  28-Apr-19 |        337        0.14        1.81
  29-Apr-19 |        337        0.14        1.95
  30-Apr-19 |        337        0.14        2.09
   1-May-19 |        337        0.14        2.23
   2-May-19 |        337        0.14        2.36
   3-May-19 |        337        0.14        2.50
   4-May-19 |        337        0.14        2.64
   5-May-19 |        337        0.14        2.78
   6-May-19 |        337        0.14        2.92
   7-May-19 |        337        0.14        3.06
   8-May-19 |        337        0.14        3.20
   9-May-19 |        337        0.14        3.34
  10-May-19 |        337        0.14        3.48
  11-May-19 |        337        0.14        3.62
  12-May-19 |        337        0.14        3.76
  13-May-19 |        337        0.14        3.89
  14-May-19 |        337        0.14        4.03
  15-May-19 |        337        0.14        4.17
  16-May-19 |        337        0.14        4.31
  17-May-19 |        337        0.14        4.45
  18-May-19 |        337        0.14        4.59
  19-May-19 |        337        0.14        4.73
  20-May-19 |        337        0.14        4.87
  21-May-19 |        337        0.14        5.01
  22-May-19 |        337        0.14        5.15
  23-May-19 |        337        0.14        5.29
  24-May-19 |        337        0.14        5.42
  25-May-19 |        337        0.14        5.56
  26-May-19 |        337        0.14        5.70
  27-May-19 |        337        0.14        5.84
  28-May-19 |        337        0.14        5.98
  29-May-19 |        337        0.14        6.12
  30-May-19 |        337        0.14        6.26
  31-May-19 |        337        0.14        6.40
   1-Jun-19 |        337        0.14        6.54
   2-Jun-19 |        337        0.14        6.68
   3-Jun-19 |        337        0.14        6.82
   4-Jun-19 |        337        0.14        6.95
   5-Jun-19 |        337        0.14        7.09
   6-Jun-19 |        337        0.14        7.23
   7-Jun-19 |        337        0.14        7.37
   8-Jun-19 |        337        0.14        7.51
   9-Jun-19 |        337        0.14        7.65
  10-Jun-19 |        337        0.14        7.79
  11-Jun-19 |        337        0.14        7.93
  12-Jun-19 |        337        0.14        8.07
  13-Jun-19 |        337        0.14        8.21
  14-Jun-19 |        337        0.14        8.34
  15-Jun-19 |        337        0.14        8.48
  16-Jun-19 |        337        0.14        8.62
  17-Jun-19 |        337        0.14        8.76
  18-Jun-19 |        337        0.14        8.90
  19-Jun-19 |        337        0.14        9.04
  20-Jun-19 |        337        0.14        9.18
  21-Jun-19 |        337        0.14        9.32
  22-Jun-19 |        337        0.14        9.46
  23-Jun-19 |        337        0.14        9.60
  24-Jun-19 |        337        0.14        9.74
  25-Jun-19 |        337        0.14        9.87
  26-Jun-19 |        337        0.14       10.01
  27-Jun-19 |        337        0.14       10.15
  28-Jun-19 |        337        0.14       10.29
  29-Jun-19 |        337        0.14       10.43
  30-Jun-19 |        337        0.14       10.57
   1-Jul-19 |        337        0.14       10.71
   2-Jul-19 |        337        0.14       10.85
   3-Jul-19 |        337        0.14       10.99
   4-Jul-19 |        337        0.14       11.13
   5-Jul-19 |        337        0.14       11.27
   6-Jul-19 |        337        0.14       11.40
   7-Jul-19 |        337        0.14       11.54
   8-Jul-19 |        337        0.14       11.68
   9-Jul-19 |        337        0.14       11.82
  10-Jul-19 |        337        0.14       11.96
  11-Jul-19 |        337        0.14       12.10
  12-Jul-19 |        337        0.14       12.24
  13-Jul-19 |        337        0.14       12.38
  14-Jul-19 |        337        0.14       12.52
  15-Jul-19 |        337        0.14       12.66
  16-Jul-19 |        337        0.14       12.80
  17-Jul-19 |        337        0.14       12.93
  18-Jul-19 |        337        0.14       13.07
  19-Jul-19 |        337        0.14       13.21
  20-Jul-19 |        337        0.14       13.35
  21-Jul-19 |        337        0.14       13.49
  22-Jul-19 |        337        0.14       13.63
  23-Jul-19 |        337        0.14       13.77
  24-Jul-19 |        337        0.14       13.91
  25-Jul-19 |        337        0.14       14.05
  26-Jul-19 |        337        0.14       14.19
  27-Jul-19 |        337        0.14       14.33
  28-Jul-19 |        337        0.14       14.46
  29-Jul-19 |        337        0.14       14.60
  30-Jul-19 |        337        0.14       14.74
  31-Jul-19 |        337        0.14       14.88
   1-Aug-19 |        337        0.14       15.02
   2-Aug-19 |        337        0.14       15.16
   3-Aug-19 |        337        0.14       15.30
   4-Aug-19 |        337        0.14       15.44
   5-Aug-19 |        337        0.14       15.58
   6-Aug-19 |        337        0.14       15.72
   7-Aug-19 |        337        0.14       15.86
   8-Aug-19 |        337        0.14       15.99
   9-Aug-19 |        337        0.14       16.13
  10-Aug-19 |        337        0.14       16.27
  11-Aug-19 |        337        0.14       16.41
  12-Aug-19 |        337        0.14       16.55
  13-Aug-19 |        337        0.14       16.69
  14-Aug-19 |        337        0.14       16.83
  15-Aug-19 |        337        0.14       16.97
  16-Aug-19 |        337        0.14       17.11
  17-Aug-19 |        337        0.14       17.25
  18-Aug-19 |        337        0.14       17.39
  19-Aug-19 |        337        0.14       17.52
  20-Aug-19 |        337        0.14       17.66
  21-Aug-19 |        337        0.14       17.80
  22-Aug-19 |        337        0.14       17.94
  23-Aug-19 |        337        0.14       18.08
  24-Aug-19 |        337        0.14       18.22
  25-Aug-19 |        337        0.14       18.36
  26-Aug-19 |        337        0.14       18.50
  27-Aug-19 |        337        0.14       18.64
  28-Aug-19 |        337        0.14       18.78
  29-Aug-19 |        337        0.14       18.92
  30-Aug-19 |        337        0.14       19.05
  31-Aug-19 |        337        0.14       19.19
   1-Sep-19 |        337        0.14       19.33
   2-Sep-19 |        337        0.14       19.47
   3-Sep-19 |        337        0.14       19.61
   4-Sep-19 |        337        0.14       19.75
   5-Sep-19 |        337        0.14       19.89
   6-Sep-19 |        337        0.14       20.03
   7-Sep-19 |        337        0.14       20.17
   8-Sep-19 |        337        0.14       20.31
   9-Sep-19 |        337        0.14       20.45
  10-Sep-19 |        337        0.14       20.58
  11-Sep-19 |        337        0.14       20.72
  12-Sep-19 |        337        0.14       20.86
  13-Sep-19 |        337        0.14       21.00
  14-Sep-19 |        337        0.14       21.14
  15-Sep-19 |        337        0.14       21.28
  16-Sep-19 |        337        0.14       21.42
  17-Sep-19 |        337        0.14       21.56
  18-Sep-19 |        337        0.14       21.70
  19-Sep-19 |        337        0.14       21.84
  20-Sep-19 |        337        0.14       21.97
  21-Sep-19 |        337        0.14       22.11
  22-Sep-19 |        337        0.14       22.25
  23-Sep-19 |        337        0.14       22.39
  24-Sep-19 |        337        0.14       22.53
  25-Sep-19 |        337        0.14       22.67
  26-Sep-19 |        337        0.14       22.81
  27-Sep-19 |        337        0.14       22.95
  28-Sep-19 |        337        0.14       23.09
  29-Sep-19 |        337        0.14       23.23
  30-Sep-19 |        337        0.14       23.37
   1-Oct-19 |        337        0.14       23.50
   2-Oct-19 |        337        0.14       23.64
   3-Oct-19 |        337        0.14       23.78
   4-Oct-19 |        337        0.14       23.92
   5-Oct-19 |        337        0.14       24.06
   6-Oct-19 |        337        0.14       24.20
   7-Oct-19 |        337        0.14       24.34
   8-Oct-19 |        337        0.14       24.48
   9-Oct-19 |        337        0.14       24.62
  10-Oct-19 |        337        0.14       24.76
  11-Oct-19 |        337        0.14       24.90
  12-Oct-19 |        337        0.14       25.03
  13-Oct-19 |        337        0.14       25.17
  14-Oct-19 |        337        0.14       25.31
  15-Oct-19 |        337        0.14       25.45
  16-Oct-19 |        337        0.14       25.59
  17-Oct-19 |        337        0.14       25.73
  18-Oct-19 |        337        0.14       25.87
  19-Oct-19 |        337        0.14       26.01
  20-Oct-19 |        337        0.14       26.15
  21-Oct-19 |        337        0.14       26.29
  22-Oct-19 |        337        0.14       26.43
  23-Oct-19 |        337        0.14       26.56
  24-Oct-19 |        337        0.14       26.70
  25-Oct-19 |        337        0.14       26.84
  26-Oct-19 |        337        0.14       26.98
  27-Oct-19 |        337        0.14       27.12
  28-Oct-19 |        337        0.14       27.26
  29-Oct-19 |        337        0.14       27.40
  30-Oct-19 |        337        0.14       27.54
  31-Oct-19 |        337        0.14       27.68
   1-Nov-19 |        337        0.14       27.82
   2-Nov-19 |        337        0.14       27.96
   3-Nov-19 |        337        0.14       28.09
   4-Nov-19 |        337        0.14       28.23
   5-Nov-19 |        337        0.14       28.37
   6-Nov-19 |        337        0.14       28.51
   7-Nov-19 |        337        0.14       28.65
   8-Nov-19 |        337        0.14       28.79
   9-Nov-19 |        337        0.14       28.93
  10-Nov-19 |        337        0.14       29.07
  11-Nov-19 |        337        0.14       29.21
  12-Nov-19 |        337        0.14       29.35
  13-Nov-19 |        337        0.14       29.49
  14-Nov-19 |        337        0.14       29.62
  15-Nov-19 |        337        0.14       29.76
  16-Nov-19 |        337        0.14       29.90
  17-Nov-19 |        337        0.14       30.04
  18-Nov-19 |        337        0.14       30.18
  19-Nov-19 |        337        0.14       30.32
  20-Nov-19 |        337        0.14       30.46
  21-Nov-19 |        337        0.14       30.60
  22-Nov-19 |        337        0.14       30.74
  23-Nov-19 |        337        0.14       30.88
  24-Nov-19 |        337        0.14       31.02
  25-Nov-19 |        337        0.14       31.15
  26-Nov-19 |        337        0.14       31.29
  27-Nov-19 |        337        0.14       31.43
  28-Nov-19 |        337        0.14       31.57
  29-Nov-19 |        337        0.14       31.71
  30-Nov-19 |        337        0.14       31.85
   1-Dec-19 |        337        0.14       31.99
   2-Dec-19 |        337        0.14       32.13
   3-Dec-19 |        337        0.14       32.27
   4-Dec-19 |        337        0.14       32.41
   5-Dec-19 |        337        0.14       32.55
   6-Dec-19 |        337        0.14       32.68
   7-Dec-19 |        337        0.14       32.82
   8-Dec-19 |        337        0.14       32.96
   9-Dec-19 |        337        0.14       33.10
  10-Dec-19 |        337        0.14       33.24
  11-Dec-19 |        337        0.14       33.38
  12-Dec-19 |        337        0.14       33.52
  13-Dec-19 |        337        0.14       33.66
  14-Dec-19 |        337        0.14       33.80
  15-Dec-19 |        337        0.14       33.94
  16-Dec-19 |        337        0.14       34.08
  17-Dec-19 |        337        0.14       34.21
  18-Dec-19 |        337        0.14       34.35
  19-Dec-19 |        337        0.14       34.49
  20-Dec-19 |        337        0.14       34.63
  21-Dec-19 |        337        0.14       34.77
  22-Dec-19 |        337        0.14       34.91
  23-Dec-19 |        337        0.14       35.05
  24-Dec-19 |        337        0.14       35.19
  25-Dec-19 |        337        0.14       35.33
  26-Dec-19 |        337        0.14       35.47
  27-Dec-19 |        337        0.14       35.61
  28-Dec-19 |        337        0.14       35.74
  29-Dec-19 |        337        0.14       35.88
  30-Dec-19 |        337        0.14       36.02
  31-Dec-19 |        337        0.14       36.16
   1-Jan-20 |        337        0.14       36.30
   2-Jan-20 |        337        0.14       36.44
   3-Jan-20 |        337        0.14       36.58
   4-Jan-20 |        337        0.14       36.72
   5-Jan-20 |        337        0.14       36.86
   6-Jan-20 |        337        0.14       37.00
   7-Jan-20 |        337        0.14       37.13
   8-Jan-20 |        337        0.14       37.27
   9-Jan-20 |        337        0.14       37.41
  10-Jan-20 |        337        0.14       37.55
  11-Jan-20 |        337        0.14       37.69
  12-Jan-20 |        337        0.14       37.83
  13-Jan-20 |        337        0.14       37.97
  14-Jan-20 |        337        0.14       38.11
  15-Jan-20 |        337        0.14       38.25
  16-Jan-20 |        337        0.14       38.39
  17-Jan-20 |        337        0.14       38.53
  18-Jan-20 |        337        0.14       38.66
  19-Jan-20 |        337        0.14       38.80
  20-Jan-20 |        337        0.14       38.94
  21-Jan-20 |        337        0.14       39.08
  22-Jan-20 |        337        0.14       39.22
  23-Jan-20 |        337        0.14       39.36
  24-Jan-20 |        337        0.14       39.50
  25-Jan-20 |        337        0.14       39.64
  26-Jan-20 |        337        0.14       39.78
  27-Jan-20 |        337        0.14       39.92
  28-Jan-20 |        337        0.14       40.06
  29-Jan-20 |        337        0.14       40.19
  30-Jan-20 |        337        0.14       40.33
  31-Jan-20 |        337        0.14       40.47
   1-Feb-20 |        337        0.14       40.61
   2-Feb-20 |        337        0.14       40.75
   3-Feb-20 |        337        0.14       40.89
   4-Feb-20 |        337        0.14       41.03
   5-Feb-20 |        337        0.14       41.17
   6-Feb-20 |        337        0.14       41.31
   7-Feb-20 |        337        0.14       41.45
   8-Feb-20 |        337        0.14       41.59
   9-Feb-20 |        337        0.14       41.72
  10-Feb-20 |        337        0.14       41.86
  11-Feb-20 |        337        0.14       42.00
  12-Feb-20 |        337        0.14       42.14
  13-Feb-20 |        337        0.14       42.28
  14-Feb-20 |        337        0.14       42.42
  15-Feb-20 |        337        0.14       42.56
  16-Feb-20 |        337        0.14       42.70
  17-Feb-20 |        337        0.14       42.84
  18-Feb-20 |        337        0.14       42.98
  19-Feb-20 |        337        0.14       43.12
  20-Feb-20 |        337        0.14       43.25
  21-Feb-20 |        337        0.14       43.39
  22-Feb-20 |        337        0.14       43.53
  23-Feb-20 |        337        0.14       43.67
  24-Feb-20 |        337        0.14       43.81
  25-Feb-20 |        337        0.14       43.95
  26-Feb-20 |        337        0.14       44.09
  27-Feb-20 |        337        0.14       44.23
  28-Feb-20 |        337        0.14       44.37
  29-Feb-20 |        337        0.14       44.51
   1-Mar-20 |        337        0.14       44.65
   2-Mar-20 |        337        0.14       44.78
   3-Mar-20 |        337        0.14       44.92
   4-Mar-20 |        337        0.14       45.06
   5-Mar-20 |        337        0.14       45.20
   6-Mar-20 |        337        0.14       45.34
   7-Mar-20 |        337        0.14       45.48
   8-Mar-20 |        337        0.14       45.62
   9-Mar-20 |        337        0.14       45.76
  10-Mar-20 |        337        0.14       45.90
  11-Mar-20 |        337        0.14       46.04
  12-Mar-20 |        337        0.14       46.18
  13-Mar-20 |        337        0.14       46.31
  14-Mar-20 |        337        0.14       46.45
  15-Mar-20 |        337        0.14       46.59
  16-Mar-20 |        337        0.14       46.73
  17-Mar-20 |        337        0.14       46.87
  18-Mar-20 |        337        0.14       47.01
  19-Mar-20 |        337        0.14       47.15
  20-Mar-20 |        337        0.14       47.29
  21-Mar-20 |        337        0.14       47.43
  22-Mar-20 |        337        0.14       47.57
  23-Mar-20 |        337        0.14       47.71
  24-Mar-20 |        337        0.14       47.84
  25-Mar-20 |        337        0.14       47.98
  26-Mar-20 |        337        0.14       48.12
  27-Mar-20 |        337        0.14       48.26
  28-Mar-20 |        337        0.14       48.40
  29-Mar-20 |        337        0.14       48.54
  30-Mar-20 |        337        0.14       48.68
  31-Mar-20 |        337        0.14       48.82
   1-Apr-20 |        337        0.14       48.96
   2-Apr-20 |        337        0.14       49.10
   3-Apr-20 |        337        0.14       49.24
   4-Apr-20 |        337        0.14       49.37
   5-Apr-20 |        337        0.14       49.51
   6-Apr-20 |        337        0.14       49.65
   7-Apr-20 |        337        0.14       49.79
   8-Apr-20 |        337        0.14       49.93
   9-Apr-20 |        337        0.14       50.07
  10-Apr-20 |        337        0.14       50.21
  11-Apr-20 |        337        0.14       50.35
  12-Apr-20 |        337        0.14       50.49
  13-Apr-20 |        337        0.14       50.63
  14-Apr-20 |        337        0.14       50.76
  15-Apr-20 |        337        0.14       50.90
  16-Apr-20 |        337        0.14       51.04
  17-Apr-20 |        337        0.14       51.18
  18-Apr-20 |        337        0.14       51.32
  19-Apr-20 |        337        0.14       51.46
  20-Apr-20 |        337        0.14       51.60
  21-Apr-20 |        337        0.14       51.74
  22-Apr-20 |        337        0.14       51.88
  23-Apr-20 |        337        0.14       52.02
  24-Apr-20 |        337        0.14       52.16
  25-Apr-20 |        337        0.14       52.29
  26-Apr-20 |        337        0.14       52.43
  27-Apr-20 |        337        0.14       52.57
  28-Apr-20 |        337        0.14       52.71
  29-Apr-20 |        337        0.14       52.85
  30-Apr-20 |        337        0.14       52.99
   1-May-20 |        337        0.14       53.13
   2-May-20 |        337        0.14       53.27
   3-May-20 |        337        0.14       53.41
   4-May-20 |        337        0.14       53.55
   5-May-20 |        337        0.14       53.69
   6-May-20 |        337        0.14       53.82
   7-May-20 |        337        0.14       53.96
   8-May-20 |        337        0.14       54.10
   9-May-20 |        337        0.14       54.24
  10-May-20 |        337        0.14       54.38
  11-May-20 |        337        0.14       54.52
  12-May-20 |        337        0.14       54.66
  13-May-20 |        337        0.14       54.80
  14-May-20 |        337        0.14       54.94
  15-May-20 |        337        0.14       55.08
  16-May-20 |        337        0.14       55.22
  17-May-20 |        337        0.14       55.35
  18-May-20 |        337        0.14       55.49
  19-May-20 |        337        0.14       55.63
  20-May-20 |        337        0.14       55.77
  21-May-20 |        337        0.14       55.91
  22-May-20 |        337        0.14       56.05
  23-May-20 |        337        0.14       56.19
  24-May-20 |        337        0.14       56.33
  25-May-20 |        337        0.14       56.47
  26-May-20 |        337        0.14       56.61
  27-May-20 |        337        0.14       56.75
  28-May-20 |        337        0.14       56.88
  29-May-20 |        337        0.14       57.02
  30-May-20 |        337        0.14       57.16
  31-May-20 |        337        0.14       57.30
   1-Jun-20 |        337        0.14       57.44
   2-Jun-20 |        337        0.14       57.58
   3-Jun-20 |        337        0.14       57.72
   4-Jun-20 |        337        0.14       57.86
   5-Jun-20 |        337        0.14       58.00
   6-Jun-20 |        337        0.14       58.14
   7-Jun-20 |        337        0.14       58.28
   8-Jun-20 |        337        0.14       58.41
   9-Jun-20 |        337        0.14       58.55
  10-Jun-20 |        337        0.14       58.69
  11-Jun-20 |        337        0.14       58.83
  12-Jun-20 |        337        0.14       58.97
  13-Jun-20 |        337        0.14       59.11
  14-Jun-20 |        337        0.14       59.25
  15-Jun-20 |        337        0.14       59.39
  16-Jun-20 |        337        0.14       59.53
  17-Jun-20 |        337        0.14       59.67
  18-Jun-20 |        337        0.14       59.81
  19-Jun-20 |        337        0.14       59.94
  20-Jun-20 |        337        0.14       60.08
  21-Jun-20 |        337        0.14       60.22
  22-Jun-20 |        337        0.14       60.36
  23-Jun-20 |        337        0.14       60.50
  24-Jun-20 |        337        0.14       60.64
  25-Jun-20 |        337        0.14       60.78
  26-Jun-20 |        337        0.14       60.92
  27-Jun-20 |        337        0.14       61.06
  28-Jun-20 |        337        0.14       61.20
  29-Jun-20 |        337        0.14       61.34
  30-Jun-20 |        337        0.14       61.47
   1-Jul-20 |        337        0.14       61.61
   2-Jul-20 |        337        0.14       61.75
   3-Jul-20 |        337        0.14       61.89
   4-Jul-20 |        337        0.14       62.03
   5-Jul-20 |        337        0.14       62.17
   6-Jul-20 |        337        0.14       62.31
   7-Jul-20 |        337        0.14       62.45
   8-Jul-20 |        337        0.14       62.59
   9-Jul-20 |        337        0.14       62.73
  10-Jul-20 |        337        0.14       62.87
  11-Jul-20 |        337        0.14       63.00
  12-Jul-20 |        337        0.14       63.14
  13-Jul-20 |        337        0.14       63.28
  14-Jul-20 |        337        0.14       63.42
  15-Jul-20 |        337        0.14       63.56
  16-Jul-20 |        337        0.14       63.70
  17-Jul-20 |        337        0.14       63.84
  18-Jul-20 |        337        0.14       63.98
  19-Jul-20 |        337        0.14       64.12
  20-Jul-20 |        337        0.14       64.26
  21-Jul-20 |        337        0.14       64.39
  22-Jul-20 |        337        0.14       64.53
  23-Jul-20 |        337        0.14       64.67
  24-Jul-20 |        337        0.14       64.81
  25-Jul-20 |        337        0.14       64.95
  26-Jul-20 |        337        0.14       65.09
  27-Jul-20 |        337        0.14       65.23
  28-Jul-20 |        337        0.14       65.37
  29-Jul-20 |        337        0.14       65.51
  30-Jul-20 |        337        0.14       65.65
  31-Jul-20 |        337        0.14       65.79
   1-Aug-20 |        337        0.14       65.92
   2-Aug-20 |        337        0.14       66.06
   3-Aug-20 |        337        0.14       66.20
   4-Aug-20 |        337        0.14       66.34
   5-Aug-20 |        337        0.14       66.48
   6-Aug-20 |        337        0.14       66.62
   7-Aug-20 |        337        0.14       66.76
   8-Aug-20 |        337        0.14       66.90
   9-Aug-20 |        337        0.14       67.04
  10-Aug-20 |        337        0.14       67.18
  11-Aug-20 |        337        0.14       67.32
  12-Aug-20 |        337        0.14       67.45
  13-Aug-20 |        337        0.14       67.59
  14-Aug-20 |        337        0.14       67.73
  15-Aug-20 |        337        0.14       67.87
  16-Aug-20 |        337        0.14       68.01
  17-Aug-20 |        337        0.14       68.15
  18-Aug-20 |        337        0.14       68.29
  19-Aug-20 |        337        0.14       68.43
  20-Aug-20 |        337        0.14       68.57
  21-Aug-20 |        337        0.14       68.71
  22-Aug-20 |        337        0.14       68.85
  23-Aug-20 |        337        0.14       68.98
  24-Aug-20 |        337        0.14       69.12
  25-Aug-20 |        337        0.14       69.26
  26-Aug-20 |        337        0.14       69.40
  27-Aug-20 |        337        0.14       69.54
  28-Aug-20 |        337        0.14       69.68
  29-Aug-20 |        337        0.14       69.82
  30-Aug-20 |        337        0.14       69.96
  31-Aug-20 |        337        0.14       70.10
   1-Sep-20 |        337        0.14       70.24
   2-Sep-20 |        337        0.14       70.38
   3-Sep-20 |        337        0.14       70.51
   4-Sep-20 |        337        0.14       70.65
   5-Sep-20 |        337        0.14       70.79
   6-Sep-20 |        337        0.14       70.93
   7-Sep-20 |        337        0.14       71.07
   8-Sep-20 |        337        0.14       71.21
   9-Sep-20 |        337        0.14       71.35
  10-Sep-20 |        337        0.14       71.49
  11-Sep-20 |        337        0.14       71.63
  12-Sep-20 |        337        0.14       71.77
  13-Sep-20 |        337        0.14       71.91
  14-Sep-20 |        337        0.14       72.04
  15-Sep-20 |        337        0.14       72.18
  16-Sep-20 |        337        0.14       72.32
  17-Sep-20 |        337        0.14       72.46
  18-Sep-20 |        337        0.14       72.60
  19-Sep-20 |        337        0.14       72.74
  20-Sep-20 |        337        0.14       72.88
  21-Sep-20 |        337        0.14       73.02
  22-Sep-20 |        337        0.14       73.16
  23-Sep-20 |        337        0.14       73.30
  24-Sep-20 |        337        0.14       73.44
  25-Sep-20 |        337        0.14       73.57
  26-Sep-20 |        337        0.14       73.71
  27-Sep-20 |        337        0.14       73.85
  28-Sep-20 |        337        0.14       73.99
  29-Sep-20 |        337        0.14       74.13
  30-Sep-20 |        337        0.14       74.27
   1-Oct-20 |        337        0.14       74.41
   2-Oct-20 |        337        0.14       74.55
   3-Oct-20 |        337        0.14       74.69
   4-Oct-20 |        337        0.14       74.83
   5-Oct-20 |        337        0.14       74.97
   6-Oct-20 |        337        0.14       75.10
   7-Oct-20 |        337        0.14       75.24
   8-Oct-20 |        337        0.14       75.38
   9-Oct-20 |        337        0.14       75.52
  10-Oct-20 |        337        0.14       75.66
  11-Oct-20 |        337        0.14       75.80
  12-Oct-20 |        337        0.14       75.94
  13-Oct-20 |        337        0.14       76.08
  14-Oct-20 |        337        0.14       76.22
  15-Oct-20 |        337        0.14       76.36
  16-Oct-20 |        337        0.14       76.50
  17-Oct-20 |        337        0.14       76.63
  18-Oct-20 |        337        0.14       76.77
  19-Oct-20 |        337        0.14       76.91
  20-Oct-20 |        337        0.14       77.05
  21-Oct-20 |        337        0.14       77.19
  22-Oct-20 |        337        0.14       77.33
  23-Oct-20 |        337        0.14       77.47
  24-Oct-20 |        337        0.14       77.61
  25-Oct-20 |        337        0.14       77.75
  26-Oct-20 |        337        0.14       77.89
  27-Oct-20 |        337        0.14       78.03
  28-Oct-20 |        337        0.14       78.16
  29-Oct-20 |        337        0.14       78.30
  30-Oct-20 |        337        0.14       78.44
  31-Oct-20 |        337        0.14       78.58
   1-Nov-20 |        337        0.14       78.72
   2-Nov-20 |        337        0.14       78.86
   3-Nov-20 |        337        0.14       79.00
   4-Nov-20 |        337        0.14       79.14
   5-Nov-20 |        337        0.14       79.28
   6-Nov-20 |        337        0.14       79.42
   7-Nov-20 |        337        0.14       79.55
   8-Nov-20 |        337        0.14       79.69
   9-Nov-20 |        337        0.14       79.83
  10-Nov-20 |        337        0.14       79.97
  11-Nov-20 |        337        0.14       80.11
  12-Nov-20 |        337        0.14       80.25
  13-Nov-20 |        337        0.14       80.39
  14-Nov-20 |        337        0.14       80.53
  15-Nov-20 |        337        0.14       80.67
  16-Nov-20 |        337        0.14       80.81
  17-Nov-20 |        337        0.14       80.95
  18-Nov-20 |        337        0.14       81.08
  19-Nov-20 |        337        0.14       81.22
  20-Nov-20 |        337        0.14       81.36
  21-Nov-20 |        337        0.14       81.50
  22-Nov-20 |        337        0.14       81.64
  23-Nov-20 |        337        0.14       81.78
  24-Nov-20 |        337        0.14       81.92
  25-Nov-20 |        337        0.14       82.06
  26-Nov-20 |        337        0.14       82.20
  27-Nov-20 |        337        0.14       82.34
  28-Nov-20 |        337        0.14       82.48
  29-Nov-20 |        337        0.14       82.61
  30-Nov-20 |        337        0.14       82.75
   1-Dec-20 |        337        0.14       82.89
   2-Dec-20 |        337        0.14       83.03
   3-Dec-20 |        337        0.14       83.17
   4-Dec-20 |        337        0.14       83.31
   5-Dec-20 |        337        0.14       83.45
   6-Dec-20 |        337        0.14       83.59
   7-Dec-20 |        337        0.14       83.73
   8-Dec-20 |        337        0.14       83.87
   9-Dec-20 |        337        0.14       84.01
  10-Dec-20 |        337        0.14       84.14
  11-Dec-20 |        337        0.14       84.28
  12-Dec-20 |        337        0.14       84.42
  13-Dec-20 |        337        0.14       84.56
  14-Dec-20 |        337        0.14       84.70
  15-Dec-20 |        337        0.14       84.84
  16-Dec-20 |        337        0.14       84.98
  17-Dec-20 |        337        0.14       85.12
  18-Dec-20 |        337        0.14       85.26
  19-Dec-20 |        337        0.14       85.40
  20-Dec-20 |        337        0.14       85.54
  21-Dec-20 |        337        0.14       85.67
  22-Dec-20 |        337        0.14       85.81
  23-Dec-20 |        337        0.14       85.95
  24-Dec-20 |        337        0.14       86.09
  25-Dec-20 |        337        0.14       86.23
  26-Dec-20 |        337        0.14       86.37
  27-Dec-20 |        337        0.14       86.51
  28-Dec-20 |        337        0.14       86.65
  29-Dec-20 |        337        0.14       86.79
  30-Dec-20 |        337        0.14       86.93
  31-Dec-20 |        337        0.14       87.07
   1-Jan-21 |        337        0.14       87.20
   2-Jan-21 |        337        0.14       87.34
   3-Jan-21 |        337        0.14       87.48
   4-Jan-21 |        337        0.14       87.62
   5-Jan-21 |        337        0.14       87.76
   6-Jan-21 |        337        0.14       87.90
   7-Jan-21 |        337        0.14       88.04
   8-Jan-21 |        337        0.14       88.18
   9-Jan-21 |        337        0.14       88.32
  10-Jan-21 |        337        0.14       88.46
  11-Jan-21 |        337        0.14       88.60
  12-Jan-21 |        337        0.14       88.73
  13-Jan-21 |        337        0.14       88.87
  14-Jan-21 |        337        0.14       89.01
  15-Jan-21 |        337        0.14       89.15
  16-Jan-21 |        337        0.14       89.29
  17-Jan-21 |        337        0.14       89.43
  18-Jan-21 |        337        0.14       89.57
  19-Jan-21 |        337        0.14       89.71
  20-Jan-21 |        337        0.14       89.85
  21-Jan-21 |        337        0.14       89.99
  22-Jan-21 |        337        0.14       90.13
  23-Jan-21 |        337        0.14       90.26
  24-Jan-21 |        337        0.14       90.40
  25-Jan-21 |        337        0.14       90.54
  26-Jan-21 |        337        0.14       90.68
  27-Jan-21 |        337        0.14       90.82
  28-Jan-21 |        337        0.14       90.96
  29-Jan-21 |        337        0.14       91.10
  30-Jan-21 |        337        0.14       91.24
  31-Jan-21 |        337        0.14       91.38
   1-Feb-21 |        337        0.14       91.52
   2-Feb-21 |        337        0.14       91.66
   3-Feb-21 |        337        0.14       91.79
   4-Feb-21 |        337        0.14       91.93
   5-Feb-21 |        337        0.14       92.07
   6-Feb-21 |        337        0.14       92.21
   7-Feb-21 |        337        0.14       92.35
   8-Feb-21 |        337        0.14       92.49
   9-Feb-21 |        337        0.14       92.63
  10-Feb-21 |        337        0.14       92.77
  11-Feb-21 |        337        0.14       92.91
  12-Feb-21 |        337        0.14       93.05
  13-Feb-21 |        337        0.14       93.18
  14-Feb-21 |        337        0.14       93.32
  15-Feb-21 |        337        0.14       93.46
  16-Feb-21 |        337        0.14       93.60
  17-Feb-21 |        337        0.14       93.74
  18-Feb-21 |        337        0.14       93.88
  19-Feb-21 |        337        0.14       94.02
  20-Feb-21 |        337        0.14       94.16
  21-Feb-21 |        337        0.14       94.30
  22-Feb-21 |        337        0.14       94.44
  23-Feb-21 |        337        0.14       94.58
  24-Feb-21 |        337        0.14       94.71
  25-Feb-21 |        337        0.14       94.85
  26-Feb-21 |        337        0.14       94.99
  27-Feb-21 |        337        0.14       95.13
  28-Feb-21 |        337        0.14       95.27
   1-Mar-21 |        337        0.14       95.41
   2-Mar-21 |        337        0.14       95.55
   3-Mar-21 |        337        0.14       95.69
   4-Mar-21 |        337        0.14       95.83
   5-Mar-21 |        337        0.14       95.97
   6-Mar-21 |        337        0.14       96.11
   7-Mar-21 |        337        0.14       96.24
   8-Mar-21 |        337        0.14       96.38
   9-Mar-21 |        337        0.14       96.52
  10-Mar-21 |        337        0.14       96.66
  11-Mar-21 |        337        0.14       96.80
  12-Mar-21 |        337        0.14       96.94
  13-Mar-21 |        337        0.14       97.08
  14-Mar-21 |        337        0.14       97.22
  15-Mar-21 |        337        0.14       97.36
  16-Mar-21 |        337        0.14       97.50
  17-Mar-21 |        337        0.14       97.64
  18-Mar-21 |        337        0.14       97.77
  19-Mar-21 |        337        0.14       97.91
  20-Mar-21 |        337        0.14       98.05
  21-Mar-21 |        337        0.14       98.19
  22-Mar-21 |        337        0.14       98.33
  23-Mar-21 |        337        0.14       98.47
  24-Mar-21 |        337        0.14       98.61
  25-Mar-21 |        337        0.14       98.75
  26-Mar-21 |        337        0.14       98.89
  27-Mar-21 |        337        0.14       99.03
  28-Mar-21 |        337        0.14       99.17
  29-Mar-21 |        337        0.14       99.30
  30-Mar-21 |        337        0.14       99.44
  31-Mar-21 |        337        0.14       99.58
   1-Apr-21 |        337        0.14       99.72
   2-Apr-21 |        337        0.14       99.86
   3-Apr-21 |        337        0.14      100.00
------------+-----------------------------------
      Total |    242,303      100.00

. ** 242,303 Observations. 337 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. ** Generate a week variable
. drop week

. gen int week = floor((date-td(31dec2018))/7)+1

. la var week "Week"

. 
. ** Generate a month variable which goes from the 16th of each month to the 15th of the next month. 
. ** This definition of month aligns with the implementation of ETS market in its initial Stages. 
. ** Nick Cox's code:
. drop month16

. gen month16 = date if day(date) == 16
(234,215 missing values generated)

. //      replace month16 = mdy(1, 16, 2019) in 1
. replace month16 = month16[_n-1] if missing(month16)
(234,215 real changes made)

. la var month16 "Month, defined as 16th of this month to 15th of next month"

. gen month16_sif = month16

. format month16 %tddd-Mon-YY

. la var month16_sif "[SIF] Month-year. For convenience."

. order month16_sif, a(month16)

. sort composite_id date

. 
. ** Generate Dummy for Interregnum period of market
. ** Covid lockdown -- 23 March 2020 to 11 October 2021. 
. ** Mock-III started on 12 October 2021.
. gen D_interregnum_week = week >= 65 & week <= 93

. replace D_interregnum_week =1 if week == 99 | week == 100
(4,718 real changes made)

. la var D_interregnum_week ///
>         "[Week-level] =1 if Interregnum due to Covid-19 lockdown, zero otherwise."

. 
. drop extinct_with_assignment removed_from_sample comment

. 
. ** Remove plants that have no observation from 16-Apr-19 to 03-Apr-21.
. bysort gpcb_id: egen pct_report = mean(!missing(pm_mass_rule0)) if ///
>         month16 >= date("2019jul16", "YMD") & D_interregnum_week == 0
(103,796 missing values generated)

. sort composite_id date

. bysort gpcb_id: egen pct_report_1 = mean(pct_report)

. drop if pct_report_1 == 0
(19,413 observations deleted)

. drop pct_report pct_report_1

. sort composite_id date  

. tab date

       Date |      Freq.     Percent        Cum.
------------+-----------------------------------
  16-Apr-19 |        310        0.14        0.14
  17-Apr-19 |        310        0.14        0.28
  18-Apr-19 |        310        0.14        0.42
  19-Apr-19 |        310        0.14        0.56
  20-Apr-19 |        310        0.14        0.70
  21-Apr-19 |        310        0.14        0.83
  22-Apr-19 |        310        0.14        0.97
  23-Apr-19 |        310        0.14        1.11
  24-Apr-19 |        310        0.14        1.25
  25-Apr-19 |        310        0.14        1.39
  26-Apr-19 |        310        0.14        1.53
  27-Apr-19 |        310        0.14        1.67
  28-Apr-19 |        310        0.14        1.81
  29-Apr-19 |        310        0.14        1.95
  30-Apr-19 |        310        0.14        2.09
   1-May-19 |        310        0.14        2.23
   2-May-19 |        310        0.14        2.36
   3-May-19 |        310        0.14        2.50
   4-May-19 |        310        0.14        2.64
   5-May-19 |        310        0.14        2.78
   6-May-19 |        310        0.14        2.92
   7-May-19 |        310        0.14        3.06
   8-May-19 |        310        0.14        3.20
   9-May-19 |        310        0.14        3.34
  10-May-19 |        310        0.14        3.48
  11-May-19 |        310        0.14        3.62
  12-May-19 |        310        0.14        3.76
  13-May-19 |        310        0.14        3.89
  14-May-19 |        310        0.14        4.03
  15-May-19 |        310        0.14        4.17
  16-May-19 |        310        0.14        4.31
  17-May-19 |        310        0.14        4.45
  18-May-19 |        310        0.14        4.59
  19-May-19 |        310        0.14        4.73
  20-May-19 |        310        0.14        4.87
  21-May-19 |        310        0.14        5.01
  22-May-19 |        310        0.14        5.15
  23-May-19 |        310        0.14        5.29
  24-May-19 |        310        0.14        5.42
  25-May-19 |        310        0.14        5.56
  26-May-19 |        310        0.14        5.70
  27-May-19 |        310        0.14        5.84
  28-May-19 |        310        0.14        5.98
  29-May-19 |        310        0.14        6.12
  30-May-19 |        310        0.14        6.26
  31-May-19 |        310        0.14        6.40
   1-Jun-19 |        310        0.14        6.54
   2-Jun-19 |        310        0.14        6.68
   3-Jun-19 |        310        0.14        6.82
   4-Jun-19 |        310        0.14        6.95
   5-Jun-19 |        310        0.14        7.09
   6-Jun-19 |        310        0.14        7.23
   7-Jun-19 |        310        0.14        7.37
   8-Jun-19 |        310        0.14        7.51
   9-Jun-19 |        310        0.14        7.65
  10-Jun-19 |        310        0.14        7.79
  11-Jun-19 |        310        0.14        7.93
  12-Jun-19 |        310        0.14        8.07
  13-Jun-19 |        310        0.14        8.21
  14-Jun-19 |        310        0.14        8.34
  15-Jun-19 |        310        0.14        8.48
  16-Jun-19 |        310        0.14        8.62
  17-Jun-19 |        310        0.14        8.76
  18-Jun-19 |        310        0.14        8.90
  19-Jun-19 |        310        0.14        9.04
  20-Jun-19 |        310        0.14        9.18
  21-Jun-19 |        310        0.14        9.32
  22-Jun-19 |        310        0.14        9.46
  23-Jun-19 |        310        0.14        9.60
  24-Jun-19 |        310        0.14        9.74
  25-Jun-19 |        310        0.14        9.87
  26-Jun-19 |        310        0.14       10.01
  27-Jun-19 |        310        0.14       10.15
  28-Jun-19 |        310        0.14       10.29
  29-Jun-19 |        310        0.14       10.43
  30-Jun-19 |        310        0.14       10.57
   1-Jul-19 |        310        0.14       10.71
   2-Jul-19 |        310        0.14       10.85
   3-Jul-19 |        310        0.14       10.99
   4-Jul-19 |        310        0.14       11.13
   5-Jul-19 |        310        0.14       11.27
   6-Jul-19 |        310        0.14       11.40
   7-Jul-19 |        310        0.14       11.54
   8-Jul-19 |        310        0.14       11.68
   9-Jul-19 |        310        0.14       11.82
  10-Jul-19 |        310        0.14       11.96
  11-Jul-19 |        310        0.14       12.10
  12-Jul-19 |        310        0.14       12.24
  13-Jul-19 |        310        0.14       12.38
  14-Jul-19 |        310        0.14       12.52
  15-Jul-19 |        310        0.14       12.66
  16-Jul-19 |        310        0.14       12.80
  17-Jul-19 |        310        0.14       12.93
  18-Jul-19 |        310        0.14       13.07
  19-Jul-19 |        310        0.14       13.21
  20-Jul-19 |        310        0.14       13.35
  21-Jul-19 |        310        0.14       13.49
  22-Jul-19 |        310        0.14       13.63
  23-Jul-19 |        310        0.14       13.77
  24-Jul-19 |        310        0.14       13.91
  25-Jul-19 |        310        0.14       14.05
  26-Jul-19 |        310        0.14       14.19
  27-Jul-19 |        310        0.14       14.33
  28-Jul-19 |        310        0.14       14.46
  29-Jul-19 |        310        0.14       14.60
  30-Jul-19 |        310        0.14       14.74
  31-Jul-19 |        310        0.14       14.88
   1-Aug-19 |        310        0.14       15.02
   2-Aug-19 |        310        0.14       15.16
   3-Aug-19 |        310        0.14       15.30
   4-Aug-19 |        310        0.14       15.44
   5-Aug-19 |        310        0.14       15.58
   6-Aug-19 |        310        0.14       15.72
   7-Aug-19 |        310        0.14       15.86
   8-Aug-19 |        310        0.14       15.99
   9-Aug-19 |        310        0.14       16.13
  10-Aug-19 |        310        0.14       16.27
  11-Aug-19 |        310        0.14       16.41
  12-Aug-19 |        310        0.14       16.55
  13-Aug-19 |        310        0.14       16.69
  14-Aug-19 |        310        0.14       16.83
  15-Aug-19 |        310        0.14       16.97
  16-Aug-19 |        310        0.14       17.11
  17-Aug-19 |        310        0.14       17.25
  18-Aug-19 |        310        0.14       17.39
  19-Aug-19 |        310        0.14       17.52
  20-Aug-19 |        310        0.14       17.66
  21-Aug-19 |        310        0.14       17.80
  22-Aug-19 |        310        0.14       17.94
  23-Aug-19 |        310        0.14       18.08
  24-Aug-19 |        310        0.14       18.22
  25-Aug-19 |        310        0.14       18.36
  26-Aug-19 |        310        0.14       18.50
  27-Aug-19 |        310        0.14       18.64
  28-Aug-19 |        310        0.14       18.78
  29-Aug-19 |        310        0.14       18.92
  30-Aug-19 |        310        0.14       19.05
  31-Aug-19 |        310        0.14       19.19
   1-Sep-19 |        310        0.14       19.33
   2-Sep-19 |        310        0.14       19.47
   3-Sep-19 |        310        0.14       19.61
   4-Sep-19 |        310        0.14       19.75
   5-Sep-19 |        310        0.14       19.89
   6-Sep-19 |        310        0.14       20.03
   7-Sep-19 |        310        0.14       20.17
   8-Sep-19 |        310        0.14       20.31
   9-Sep-19 |        310        0.14       20.45
  10-Sep-19 |        310        0.14       20.58
  11-Sep-19 |        310        0.14       20.72
  12-Sep-19 |        310        0.14       20.86
  13-Sep-19 |        310        0.14       21.00
  14-Sep-19 |        310        0.14       21.14
  15-Sep-19 |        310        0.14       21.28
  16-Sep-19 |        310        0.14       21.42
  17-Sep-19 |        310        0.14       21.56
  18-Sep-19 |        310        0.14       21.70
  19-Sep-19 |        310        0.14       21.84
  20-Sep-19 |        310        0.14       21.97
  21-Sep-19 |        310        0.14       22.11
  22-Sep-19 |        310        0.14       22.25
  23-Sep-19 |        310        0.14       22.39
  24-Sep-19 |        310        0.14       22.53
  25-Sep-19 |        310        0.14       22.67
  26-Sep-19 |        310        0.14       22.81
  27-Sep-19 |        310        0.14       22.95
  28-Sep-19 |        310        0.14       23.09
  29-Sep-19 |        310        0.14       23.23
  30-Sep-19 |        310        0.14       23.37
   1-Oct-19 |        310        0.14       23.50
   2-Oct-19 |        310        0.14       23.64
   3-Oct-19 |        310        0.14       23.78
   4-Oct-19 |        310        0.14       23.92
   5-Oct-19 |        310        0.14       24.06
   6-Oct-19 |        310        0.14       24.20
   7-Oct-19 |        310        0.14       24.34
   8-Oct-19 |        310        0.14       24.48
   9-Oct-19 |        310        0.14       24.62
  10-Oct-19 |        310        0.14       24.76
  11-Oct-19 |        310        0.14       24.90
  12-Oct-19 |        310        0.14       25.03
  13-Oct-19 |        310        0.14       25.17
  14-Oct-19 |        310        0.14       25.31
  15-Oct-19 |        310        0.14       25.45
  16-Oct-19 |        310        0.14       25.59
  17-Oct-19 |        310        0.14       25.73
  18-Oct-19 |        310        0.14       25.87
  19-Oct-19 |        310        0.14       26.01
  20-Oct-19 |        310        0.14       26.15
  21-Oct-19 |        310        0.14       26.29
  22-Oct-19 |        310        0.14       26.43
  23-Oct-19 |        310        0.14       26.56
  24-Oct-19 |        310        0.14       26.70
  25-Oct-19 |        310        0.14       26.84
  26-Oct-19 |        310        0.14       26.98
  27-Oct-19 |        310        0.14       27.12
  28-Oct-19 |        310        0.14       27.26
  29-Oct-19 |        310        0.14       27.40
  30-Oct-19 |        310        0.14       27.54
  31-Oct-19 |        310        0.14       27.68
   1-Nov-19 |        310        0.14       27.82
   2-Nov-19 |        310        0.14       27.96
   3-Nov-19 |        310        0.14       28.09
   4-Nov-19 |        310        0.14       28.23
   5-Nov-19 |        310        0.14       28.37
   6-Nov-19 |        310        0.14       28.51
   7-Nov-19 |        310        0.14       28.65
   8-Nov-19 |        310        0.14       28.79
   9-Nov-19 |        310        0.14       28.93
  10-Nov-19 |        310        0.14       29.07
  11-Nov-19 |        310        0.14       29.21
  12-Nov-19 |        310        0.14       29.35
  13-Nov-19 |        310        0.14       29.49
  14-Nov-19 |        310        0.14       29.62
  15-Nov-19 |        310        0.14       29.76
  16-Nov-19 |        310        0.14       29.90
  17-Nov-19 |        310        0.14       30.04
  18-Nov-19 |        310        0.14       30.18
  19-Nov-19 |        310        0.14       30.32
  20-Nov-19 |        310        0.14       30.46
  21-Nov-19 |        310        0.14       30.60
  22-Nov-19 |        310        0.14       30.74
  23-Nov-19 |        310        0.14       30.88
  24-Nov-19 |        310        0.14       31.02
  25-Nov-19 |        310        0.14       31.15
  26-Nov-19 |        310        0.14       31.29
  27-Nov-19 |        310        0.14       31.43
  28-Nov-19 |        310        0.14       31.57
  29-Nov-19 |        310        0.14       31.71
  30-Nov-19 |        310        0.14       31.85
   1-Dec-19 |        310        0.14       31.99
   2-Dec-19 |        310        0.14       32.13
   3-Dec-19 |        310        0.14       32.27
   4-Dec-19 |        310        0.14       32.41
   5-Dec-19 |        310        0.14       32.55
   6-Dec-19 |        310        0.14       32.68
   7-Dec-19 |        310        0.14       32.82
   8-Dec-19 |        310        0.14       32.96
   9-Dec-19 |        310        0.14       33.10
  10-Dec-19 |        310        0.14       33.24
  11-Dec-19 |        310        0.14       33.38
  12-Dec-19 |        310        0.14       33.52
  13-Dec-19 |        310        0.14       33.66
  14-Dec-19 |        310        0.14       33.80
  15-Dec-19 |        310        0.14       33.94
  16-Dec-19 |        310        0.14       34.08
  17-Dec-19 |        310        0.14       34.21
  18-Dec-19 |        310        0.14       34.35
  19-Dec-19 |        310        0.14       34.49
  20-Dec-19 |        310        0.14       34.63
  21-Dec-19 |        310        0.14       34.77
  22-Dec-19 |        310        0.14       34.91
  23-Dec-19 |        310        0.14       35.05
  24-Dec-19 |        310        0.14       35.19
  25-Dec-19 |        310        0.14       35.33
  26-Dec-19 |        310        0.14       35.47
  27-Dec-19 |        310        0.14       35.61
  28-Dec-19 |        310        0.14       35.74
  29-Dec-19 |        310        0.14       35.88
  30-Dec-19 |        310        0.14       36.02
  31-Dec-19 |        310        0.14       36.16
   1-Jan-20 |        310        0.14       36.30
   2-Jan-20 |        310        0.14       36.44
   3-Jan-20 |        310        0.14       36.58
   4-Jan-20 |        310        0.14       36.72
   5-Jan-20 |        310        0.14       36.86
   6-Jan-20 |        310        0.14       37.00
   7-Jan-20 |        310        0.14       37.13
   8-Jan-20 |        310        0.14       37.27
   9-Jan-20 |        310        0.14       37.41
  10-Jan-20 |        310        0.14       37.55
  11-Jan-20 |        310        0.14       37.69
  12-Jan-20 |        310        0.14       37.83
  13-Jan-20 |        310        0.14       37.97
  14-Jan-20 |        310        0.14       38.11
  15-Jan-20 |        310        0.14       38.25
  16-Jan-20 |        310        0.14       38.39
  17-Jan-20 |        310        0.14       38.53
  18-Jan-20 |        310        0.14       38.66
  19-Jan-20 |        310        0.14       38.80
  20-Jan-20 |        310        0.14       38.94
  21-Jan-20 |        310        0.14       39.08
  22-Jan-20 |        310        0.14       39.22
  23-Jan-20 |        310        0.14       39.36
  24-Jan-20 |        310        0.14       39.50
  25-Jan-20 |        310        0.14       39.64
  26-Jan-20 |        310        0.14       39.78
  27-Jan-20 |        310        0.14       39.92
  28-Jan-20 |        310        0.14       40.06
  29-Jan-20 |        310        0.14       40.19
  30-Jan-20 |        310        0.14       40.33
  31-Jan-20 |        310        0.14       40.47
   1-Feb-20 |        310        0.14       40.61
   2-Feb-20 |        310        0.14       40.75
   3-Feb-20 |        310        0.14       40.89
   4-Feb-20 |        310        0.14       41.03
   5-Feb-20 |        310        0.14       41.17
   6-Feb-20 |        310        0.14       41.31
   7-Feb-20 |        310        0.14       41.45
   8-Feb-20 |        310        0.14       41.59
   9-Feb-20 |        310        0.14       41.72
  10-Feb-20 |        310        0.14       41.86
  11-Feb-20 |        310        0.14       42.00
  12-Feb-20 |        310        0.14       42.14
  13-Feb-20 |        310        0.14       42.28
  14-Feb-20 |        310        0.14       42.42
  15-Feb-20 |        310        0.14       42.56
  16-Feb-20 |        310        0.14       42.70
  17-Feb-20 |        310        0.14       42.84
  18-Feb-20 |        310        0.14       42.98
  19-Feb-20 |        310        0.14       43.12
  20-Feb-20 |        310        0.14       43.25
  21-Feb-20 |        310        0.14       43.39
  22-Feb-20 |        310        0.14       43.53
  23-Feb-20 |        310        0.14       43.67
  24-Feb-20 |        310        0.14       43.81
  25-Feb-20 |        310        0.14       43.95
  26-Feb-20 |        310        0.14       44.09
  27-Feb-20 |        310        0.14       44.23
  28-Feb-20 |        310        0.14       44.37
  29-Feb-20 |        310        0.14       44.51
   1-Mar-20 |        310        0.14       44.65
   2-Mar-20 |        310        0.14       44.78
   3-Mar-20 |        310        0.14       44.92
   4-Mar-20 |        310        0.14       45.06
   5-Mar-20 |        310        0.14       45.20
   6-Mar-20 |        310        0.14       45.34
   7-Mar-20 |        310        0.14       45.48
   8-Mar-20 |        310        0.14       45.62
   9-Mar-20 |        310        0.14       45.76
  10-Mar-20 |        310        0.14       45.90
  11-Mar-20 |        310        0.14       46.04
  12-Mar-20 |        310        0.14       46.18
  13-Mar-20 |        310        0.14       46.31
  14-Mar-20 |        310        0.14       46.45
  15-Mar-20 |        310        0.14       46.59
  16-Mar-20 |        310        0.14       46.73
  17-Mar-20 |        310        0.14       46.87
  18-Mar-20 |        310        0.14       47.01
  19-Mar-20 |        310        0.14       47.15
  20-Mar-20 |        310        0.14       47.29
  21-Mar-20 |        310        0.14       47.43
  22-Mar-20 |        310        0.14       47.57
  23-Mar-20 |        310        0.14       47.71
  24-Mar-20 |        310        0.14       47.84
  25-Mar-20 |        310        0.14       47.98
  26-Mar-20 |        310        0.14       48.12
  27-Mar-20 |        310        0.14       48.26
  28-Mar-20 |        310        0.14       48.40
  29-Mar-20 |        310        0.14       48.54
  30-Mar-20 |        310        0.14       48.68
  31-Mar-20 |        310        0.14       48.82
   1-Apr-20 |        310        0.14       48.96
   2-Apr-20 |        310        0.14       49.10
   3-Apr-20 |        310        0.14       49.24
   4-Apr-20 |        310        0.14       49.37
   5-Apr-20 |        310        0.14       49.51
   6-Apr-20 |        310        0.14       49.65
   7-Apr-20 |        310        0.14       49.79
   8-Apr-20 |        310        0.14       49.93
   9-Apr-20 |        310        0.14       50.07
  10-Apr-20 |        310        0.14       50.21
  11-Apr-20 |        310        0.14       50.35
  12-Apr-20 |        310        0.14       50.49
  13-Apr-20 |        310        0.14       50.63
  14-Apr-20 |        310        0.14       50.76
  15-Apr-20 |        310        0.14       50.90
  16-Apr-20 |        310        0.14       51.04
  17-Apr-20 |        310        0.14       51.18
  18-Apr-20 |        310        0.14       51.32
  19-Apr-20 |        310        0.14       51.46
  20-Apr-20 |        310        0.14       51.60
  21-Apr-20 |        310        0.14       51.74
  22-Apr-20 |        310        0.14       51.88
  23-Apr-20 |        310        0.14       52.02
  24-Apr-20 |        310        0.14       52.16
  25-Apr-20 |        310        0.14       52.29
  26-Apr-20 |        310        0.14       52.43
  27-Apr-20 |        310        0.14       52.57
  28-Apr-20 |        310        0.14       52.71
  29-Apr-20 |        310        0.14       52.85
  30-Apr-20 |        310        0.14       52.99
   1-May-20 |        310        0.14       53.13
   2-May-20 |        310        0.14       53.27
   3-May-20 |        310        0.14       53.41
   4-May-20 |        310        0.14       53.55
   5-May-20 |        310        0.14       53.69
   6-May-20 |        310        0.14       53.82
   7-May-20 |        310        0.14       53.96
   8-May-20 |        310        0.14       54.10
   9-May-20 |        310        0.14       54.24
  10-May-20 |        310        0.14       54.38
  11-May-20 |        310        0.14       54.52
  12-May-20 |        310        0.14       54.66
  13-May-20 |        310        0.14       54.80
  14-May-20 |        310        0.14       54.94
  15-May-20 |        310        0.14       55.08
  16-May-20 |        310        0.14       55.22
  17-May-20 |        310        0.14       55.35
  18-May-20 |        310        0.14       55.49
  19-May-20 |        310        0.14       55.63
  20-May-20 |        310        0.14       55.77
  21-May-20 |        310        0.14       55.91
  22-May-20 |        310        0.14       56.05
  23-May-20 |        310        0.14       56.19
  24-May-20 |        310        0.14       56.33
  25-May-20 |        310        0.14       56.47
  26-May-20 |        310        0.14       56.61
  27-May-20 |        310        0.14       56.75
  28-May-20 |        310        0.14       56.88
  29-May-20 |        310        0.14       57.02
  30-May-20 |        310        0.14       57.16
  31-May-20 |        310        0.14       57.30
   1-Jun-20 |        310        0.14       57.44
   2-Jun-20 |        310        0.14       57.58
   3-Jun-20 |        310        0.14       57.72
   4-Jun-20 |        310        0.14       57.86
   5-Jun-20 |        310        0.14       58.00
   6-Jun-20 |        310        0.14       58.14
   7-Jun-20 |        310        0.14       58.28
   8-Jun-20 |        310        0.14       58.41
   9-Jun-20 |        310        0.14       58.55
  10-Jun-20 |        310        0.14       58.69
  11-Jun-20 |        310        0.14       58.83
  12-Jun-20 |        310        0.14       58.97
  13-Jun-20 |        310        0.14       59.11
  14-Jun-20 |        310        0.14       59.25
  15-Jun-20 |        310        0.14       59.39
  16-Jun-20 |        310        0.14       59.53
  17-Jun-20 |        310        0.14       59.67
  18-Jun-20 |        310        0.14       59.81
  19-Jun-20 |        310        0.14       59.94
  20-Jun-20 |        310        0.14       60.08
  21-Jun-20 |        310        0.14       60.22
  22-Jun-20 |        310        0.14       60.36
  23-Jun-20 |        310        0.14       60.50
  24-Jun-20 |        310        0.14       60.64
  25-Jun-20 |        310        0.14       60.78
  26-Jun-20 |        310        0.14       60.92
  27-Jun-20 |        310        0.14       61.06
  28-Jun-20 |        310        0.14       61.20
  29-Jun-20 |        310        0.14       61.34
  30-Jun-20 |        310        0.14       61.47
   1-Jul-20 |        310        0.14       61.61
   2-Jul-20 |        310        0.14       61.75
   3-Jul-20 |        310        0.14       61.89
   4-Jul-20 |        310        0.14       62.03
   5-Jul-20 |        310        0.14       62.17
   6-Jul-20 |        310        0.14       62.31
   7-Jul-20 |        310        0.14       62.45
   8-Jul-20 |        310        0.14       62.59
   9-Jul-20 |        310        0.14       62.73
  10-Jul-20 |        310        0.14       62.87
  11-Jul-20 |        310        0.14       63.00
  12-Jul-20 |        310        0.14       63.14
  13-Jul-20 |        310        0.14       63.28
  14-Jul-20 |        310        0.14       63.42
  15-Jul-20 |        310        0.14       63.56
  16-Jul-20 |        310        0.14       63.70
  17-Jul-20 |        310        0.14       63.84
  18-Jul-20 |        310        0.14       63.98
  19-Jul-20 |        310        0.14       64.12
  20-Jul-20 |        310        0.14       64.26
  21-Jul-20 |        310        0.14       64.39
  22-Jul-20 |        310        0.14       64.53
  23-Jul-20 |        310        0.14       64.67
  24-Jul-20 |        310        0.14       64.81
  25-Jul-20 |        310        0.14       64.95
  26-Jul-20 |        310        0.14       65.09
  27-Jul-20 |        310        0.14       65.23
  28-Jul-20 |        310        0.14       65.37
  29-Jul-20 |        310        0.14       65.51
  30-Jul-20 |        310        0.14       65.65
  31-Jul-20 |        310        0.14       65.79
   1-Aug-20 |        310        0.14       65.92
   2-Aug-20 |        310        0.14       66.06
   3-Aug-20 |        310        0.14       66.20
   4-Aug-20 |        310        0.14       66.34
   5-Aug-20 |        310        0.14       66.48
   6-Aug-20 |        310        0.14       66.62
   7-Aug-20 |        310        0.14       66.76
   8-Aug-20 |        310        0.14       66.90
   9-Aug-20 |        310        0.14       67.04
  10-Aug-20 |        310        0.14       67.18
  11-Aug-20 |        310        0.14       67.32
  12-Aug-20 |        310        0.14       67.45
  13-Aug-20 |        310        0.14       67.59
  14-Aug-20 |        310        0.14       67.73
  15-Aug-20 |        310        0.14       67.87
  16-Aug-20 |        310        0.14       68.01
  17-Aug-20 |        310        0.14       68.15
  18-Aug-20 |        310        0.14       68.29
  19-Aug-20 |        310        0.14       68.43
  20-Aug-20 |        310        0.14       68.57
  21-Aug-20 |        310        0.14       68.71
  22-Aug-20 |        310        0.14       68.85
  23-Aug-20 |        310        0.14       68.98
  24-Aug-20 |        310        0.14       69.12
  25-Aug-20 |        310        0.14       69.26
  26-Aug-20 |        310        0.14       69.40
  27-Aug-20 |        310        0.14       69.54
  28-Aug-20 |        310        0.14       69.68
  29-Aug-20 |        310        0.14       69.82
  30-Aug-20 |        310        0.14       69.96
  31-Aug-20 |        310        0.14       70.10
   1-Sep-20 |        310        0.14       70.24
   2-Sep-20 |        310        0.14       70.38
   3-Sep-20 |        310        0.14       70.51
   4-Sep-20 |        310        0.14       70.65
   5-Sep-20 |        310        0.14       70.79
   6-Sep-20 |        310        0.14       70.93
   7-Sep-20 |        310        0.14       71.07
   8-Sep-20 |        310        0.14       71.21
   9-Sep-20 |        310        0.14       71.35
  10-Sep-20 |        310        0.14       71.49
  11-Sep-20 |        310        0.14       71.63
  12-Sep-20 |        310        0.14       71.77
  13-Sep-20 |        310        0.14       71.91
  14-Sep-20 |        310        0.14       72.04
  15-Sep-20 |        310        0.14       72.18
  16-Sep-20 |        310        0.14       72.32
  17-Sep-20 |        310        0.14       72.46
  18-Sep-20 |        310        0.14       72.60
  19-Sep-20 |        310        0.14       72.74
  20-Sep-20 |        310        0.14       72.88
  21-Sep-20 |        310        0.14       73.02
  22-Sep-20 |        310        0.14       73.16
  23-Sep-20 |        310        0.14       73.30
  24-Sep-20 |        310        0.14       73.44
  25-Sep-20 |        310        0.14       73.57
  26-Sep-20 |        310        0.14       73.71
  27-Sep-20 |        310        0.14       73.85
  28-Sep-20 |        310        0.14       73.99
  29-Sep-20 |        310        0.14       74.13
  30-Sep-20 |        310        0.14       74.27
   1-Oct-20 |        310        0.14       74.41
   2-Oct-20 |        310        0.14       74.55
   3-Oct-20 |        310        0.14       74.69
   4-Oct-20 |        310        0.14       74.83
   5-Oct-20 |        310        0.14       74.97
   6-Oct-20 |        310        0.14       75.10
   7-Oct-20 |        310        0.14       75.24
   8-Oct-20 |        310        0.14       75.38
   9-Oct-20 |        310        0.14       75.52
  10-Oct-20 |        310        0.14       75.66
  11-Oct-20 |        310        0.14       75.80
  12-Oct-20 |        310        0.14       75.94
  13-Oct-20 |        310        0.14       76.08
  14-Oct-20 |        310        0.14       76.22
  15-Oct-20 |        310        0.14       76.36
  16-Oct-20 |        310        0.14       76.50
  17-Oct-20 |        310        0.14       76.63
  18-Oct-20 |        310        0.14       76.77
  19-Oct-20 |        310        0.14       76.91
  20-Oct-20 |        310        0.14       77.05
  21-Oct-20 |        310        0.14       77.19
  22-Oct-20 |        310        0.14       77.33
  23-Oct-20 |        310        0.14       77.47
  24-Oct-20 |        310        0.14       77.61
  25-Oct-20 |        310        0.14       77.75
  26-Oct-20 |        310        0.14       77.89
  27-Oct-20 |        310        0.14       78.03
  28-Oct-20 |        310        0.14       78.16
  29-Oct-20 |        310        0.14       78.30
  30-Oct-20 |        310        0.14       78.44
  31-Oct-20 |        310        0.14       78.58
   1-Nov-20 |        310        0.14       78.72
   2-Nov-20 |        310        0.14       78.86
   3-Nov-20 |        310        0.14       79.00
   4-Nov-20 |        310        0.14       79.14
   5-Nov-20 |        310        0.14       79.28
   6-Nov-20 |        310        0.14       79.42
   7-Nov-20 |        310        0.14       79.55
   8-Nov-20 |        310        0.14       79.69
   9-Nov-20 |        310        0.14       79.83
  10-Nov-20 |        310        0.14       79.97
  11-Nov-20 |        310        0.14       80.11
  12-Nov-20 |        310        0.14       80.25
  13-Nov-20 |        310        0.14       80.39
  14-Nov-20 |        310        0.14       80.53
  15-Nov-20 |        310        0.14       80.67
  16-Nov-20 |        310        0.14       80.81
  17-Nov-20 |        310        0.14       80.95
  18-Nov-20 |        310        0.14       81.08
  19-Nov-20 |        310        0.14       81.22
  20-Nov-20 |        310        0.14       81.36
  21-Nov-20 |        310        0.14       81.50
  22-Nov-20 |        310        0.14       81.64
  23-Nov-20 |        310        0.14       81.78
  24-Nov-20 |        310        0.14       81.92
  25-Nov-20 |        310        0.14       82.06
  26-Nov-20 |        310        0.14       82.20
  27-Nov-20 |        310        0.14       82.34
  28-Nov-20 |        310        0.14       82.48
  29-Nov-20 |        310        0.14       82.61
  30-Nov-20 |        310        0.14       82.75
   1-Dec-20 |        310        0.14       82.89
   2-Dec-20 |        310        0.14       83.03
   3-Dec-20 |        310        0.14       83.17
   4-Dec-20 |        310        0.14       83.31
   5-Dec-20 |        310        0.14       83.45
   6-Dec-20 |        310        0.14       83.59
   7-Dec-20 |        310        0.14       83.73
   8-Dec-20 |        310        0.14       83.87
   9-Dec-20 |        310        0.14       84.01
  10-Dec-20 |        310        0.14       84.14
  11-Dec-20 |        310        0.14       84.28
  12-Dec-20 |        310        0.14       84.42
  13-Dec-20 |        310        0.14       84.56
  14-Dec-20 |        310        0.14       84.70
  15-Dec-20 |        310        0.14       84.84
  16-Dec-20 |        310        0.14       84.98
  17-Dec-20 |        310        0.14       85.12
  18-Dec-20 |        310        0.14       85.26
  19-Dec-20 |        310        0.14       85.40
  20-Dec-20 |        310        0.14       85.54
  21-Dec-20 |        310        0.14       85.67
  22-Dec-20 |        310        0.14       85.81
  23-Dec-20 |        310        0.14       85.95
  24-Dec-20 |        310        0.14       86.09
  25-Dec-20 |        310        0.14       86.23
  26-Dec-20 |        310        0.14       86.37
  27-Dec-20 |        310        0.14       86.51
  28-Dec-20 |        310        0.14       86.65
  29-Dec-20 |        310        0.14       86.79
  30-Dec-20 |        310        0.14       86.93
  31-Dec-20 |        310        0.14       87.07
   1-Jan-21 |        310        0.14       87.20
   2-Jan-21 |        310        0.14       87.34
   3-Jan-21 |        310        0.14       87.48
   4-Jan-21 |        310        0.14       87.62
   5-Jan-21 |        310        0.14       87.76
   6-Jan-21 |        310        0.14       87.90
   7-Jan-21 |        310        0.14       88.04
   8-Jan-21 |        310        0.14       88.18
   9-Jan-21 |        310        0.14       88.32
  10-Jan-21 |        310        0.14       88.46
  11-Jan-21 |        310        0.14       88.60
  12-Jan-21 |        310        0.14       88.73
  13-Jan-21 |        310        0.14       88.87
  14-Jan-21 |        310        0.14       89.01
  15-Jan-21 |        310        0.14       89.15
  16-Jan-21 |        310        0.14       89.29
  17-Jan-21 |        310        0.14       89.43
  18-Jan-21 |        310        0.14       89.57
  19-Jan-21 |        310        0.14       89.71
  20-Jan-21 |        310        0.14       89.85
  21-Jan-21 |        310        0.14       89.99
  22-Jan-21 |        310        0.14       90.13
  23-Jan-21 |        310        0.14       90.26
  24-Jan-21 |        310        0.14       90.40
  25-Jan-21 |        310        0.14       90.54
  26-Jan-21 |        310        0.14       90.68
  27-Jan-21 |        310        0.14       90.82
  28-Jan-21 |        310        0.14       90.96
  29-Jan-21 |        310        0.14       91.10
  30-Jan-21 |        310        0.14       91.24
  31-Jan-21 |        310        0.14       91.38
   1-Feb-21 |        310        0.14       91.52
   2-Feb-21 |        310        0.14       91.66
   3-Feb-21 |        310        0.14       91.79
   4-Feb-21 |        310        0.14       91.93
   5-Feb-21 |        310        0.14       92.07
   6-Feb-21 |        310        0.14       92.21
   7-Feb-21 |        310        0.14       92.35
   8-Feb-21 |        310        0.14       92.49
   9-Feb-21 |        310        0.14       92.63
  10-Feb-21 |        310        0.14       92.77
  11-Feb-21 |        310        0.14       92.91
  12-Feb-21 |        310        0.14       93.05
  13-Feb-21 |        310        0.14       93.18
  14-Feb-21 |        310        0.14       93.32
  15-Feb-21 |        310        0.14       93.46
  16-Feb-21 |        310        0.14       93.60
  17-Feb-21 |        310        0.14       93.74
  18-Feb-21 |        310        0.14       93.88
  19-Feb-21 |        310        0.14       94.02
  20-Feb-21 |        310        0.14       94.16
  21-Feb-21 |        310        0.14       94.30
  22-Feb-21 |        310        0.14       94.44
  23-Feb-21 |        310        0.14       94.58
  24-Feb-21 |        310        0.14       94.71
  25-Feb-21 |        310        0.14       94.85
  26-Feb-21 |        310        0.14       94.99
  27-Feb-21 |        310        0.14       95.13
  28-Feb-21 |        310        0.14       95.27
   1-Mar-21 |        310        0.14       95.41
   2-Mar-21 |        310        0.14       95.55
   3-Mar-21 |        310        0.14       95.69
   4-Mar-21 |        310        0.14       95.83
   5-Mar-21 |        310        0.14       95.97
   6-Mar-21 |        310        0.14       96.11
   7-Mar-21 |        310        0.14       96.24
   8-Mar-21 |        310        0.14       96.38
   9-Mar-21 |        310        0.14       96.52
  10-Mar-21 |        310        0.14       96.66
  11-Mar-21 |        310        0.14       96.80
  12-Mar-21 |        310        0.14       96.94
  13-Mar-21 |        310        0.14       97.08
  14-Mar-21 |        310        0.14       97.22
  15-Mar-21 |        310        0.14       97.36
  16-Mar-21 |        310        0.14       97.50
  17-Mar-21 |        310        0.14       97.64
  18-Mar-21 |        310        0.14       97.77
  19-Mar-21 |        310        0.14       97.91
  20-Mar-21 |        310        0.14       98.05
  21-Mar-21 |        310        0.14       98.19
  22-Mar-21 |        310        0.14       98.33
  23-Mar-21 |        310        0.14       98.47
  24-Mar-21 |        310        0.14       98.61
  25-Mar-21 |        310        0.14       98.75
  26-Mar-21 |        310        0.14       98.89
  27-Mar-21 |        310        0.14       99.03
  28-Mar-21 |        310        0.14       99.17
  29-Mar-21 |        310        0.14       99.30
  30-Mar-21 |        310        0.14       99.44
  31-Mar-21 |        310        0.14       99.58
   1-Apr-21 |        310        0.14       99.72
   2-Apr-21 |        310        0.14       99.86
   3-Apr-21 |        310        0.14      100.00
------------+-----------------------------------
      Total |    222,890      100.00

. ** 222,890 Observations. 310 Stacks. 719 Days from 16-Apr-19 to 03-Apr-21.
. 
. gen period = 0

. ** Mock-I
. replace period = 1 if date >= td(15jul2019) 
(194,990 real changes made)

. ** Mock-II
. replace period = 2 if date >= td(13aug2019)
(186,000 real changes made)

. ** Comp-I
. replace period = 3 if date >= td(16sep2019)
(175,460 real changes made)

. ** Comp-II
. replace period = 4 if date >= td(16oct2019)
(166,160 real changes made)

. ** Comp-III
. replace period = 5 if date >= td(16nov2019)
(156,550 real changes made)

. ** Comp-IV
. replace period = 6 if date >= td(01jan2020)
(142,290 real changes made)

. ** Comp-V
. replace period = 7 if date >= td(01feb2020)
(132,680 real changes made)

. ** Comp-VI
. replace period = 8 if date >= td(01mar2020)
(123,690 real changes made)

. ** Interregnum-I
. replace period = 9 if date >= td(22mar2020)
(117,180 real changes made)

. ** Mock-III
. replace period = 10 if date >= td(12oct2020)
(53,940 real changes made)

. ** Interregnum-II
. replace period = 11 if date >= td(12nov2020)
(44,330 real changes made)

. ** Comp-VII
. replace period = 12 if date >= td(01dec2020)
(38,440 real changes made)

. ** Comp-VIII
. replace period = 13 if date >= td(01jan2021)
(28,830 real changes made)

. ** Comp-IX
. replace period = 14 if date >= td(01feb2021)
(19,220 real changes made)

. ** Comp-X
. replace period = 15 if date >= td(01mar2021)
(10,540 real changes made)

. 
. drop if date >=  td(01apr2021)
(930 observations deleted)

. 
. *tab period if composite_id == "GJSRT100740111"
. gen temp = 1

. bysort period: egen period_length = sum(temp) 

. replace period_length = period_length / 310 
(221,960 real changes made)

. drop temp

. 
. ********************************************************************************
. ********************* [1] CALCULATE ACTUAL STACK DAY MASS **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         ** Replace tot_report_hrs to zero 
.         ** if the stack was not sending a valid caliberated stack-day kg/hr that day
.         gen tot_report_hrs_rule`i' = tot_report_hrs
  3.         replace tot_report_hrs_rule`i' = 0 if D_vctransmitting_rule`i' == 0
  4.         label var tot_report_hrs_rule`i' ///
>                 "[RE-LABELED] Stack-day VALID CALIBRATED Reporting Hours from CEMS - rule `i'"
  5. 
.         ** Calculate DAILY actual mass emissions using CEMA Day Reporting Hours
.         gen stack_daily_mass_actual_rule`i' = pm_mass_rule`i' * tot_report_hrs_rule`i'
  6.         la var stack_daily_mass_actual_rule`i' ///
>                 "Stack Day Actual Mass Emissions (kg) from CEMS Reported Hours - rule `i'"
  7. 
. }
(13,799 real changes made)
(92,287 missing values generated)
(13,140 real changes made)
(91,628 missing values generated)
(51,614 real changes made)
(130,102 missing values generated)
(51,140 real changes made)
(129,628 missing values generated)
(71,887 real changes made)
(150,375 missing values generated)
(71,520 real changes made)
(150,008 missing values generated)
(60,805 real changes made)
(139,293 missing values generated)
(60,375 real changes made)
(138,863 missing values generated)
(30,192 real changes made)
(108,680 missing values generated)
(29,607 real changes made)
(108,095 missing values generated)

. 
. ********************************************************************************
. ***************** [2] Weekly NON-REPORTING HOURS FOR IMPUTATION *****************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         replace tot_report_hrs_rule`i' = 0 if tot_report_hrs_rule`i' == .
  3.         bysort composite_id week: egen tot_weekly_report_hrs_rule`i' = sum(tot_report_hrs_rule`i')
  4.         bysort composite_id week: gen weekly_DA_rule`i' = (tot_weekly_report_hrs_rule`i'/168)*100
  5.         gen non_report_hrs_rule`i' = 168-tot_weekly_report_hrs_rule`i'
  6.         by composite_id week: egen mean_weekly_report_hrs_rule`i' = mean(tot_report_hrs_rule`i')
  7.         ** Calculate DAILY non-reporting hours for imputation
.         gen daily_nonreport_hrs_rule`i' = 24 - tot_report_hrs_rule`i'
  8.         order daily_nonreport_hrs_rule`i', a(tot_report_hrs_rule`i')
  9.         la var daily_nonreport_hrs_rule`i' ///
>                 "Stack Day NON-Reporting Hours - CEMS - rule `i'"
 10. 
. }
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. 
. ********************************************************************************
. ********* [3] For MOC Imp: **********
. ********************************************************************************
. *encode composite_id, gen(composite_id_enc)
. gen composite_id_enc = composite_id

. forvalues i=0(1)9{
  2. 
. // Note that the percentiles and means are calculated at the week level, which 
. // is the appropriate level to match the imputation method used in the market.
. 
.         ** Calculate stack's own week mean kg/hr
.         bysort composite_id week: egen imp_mean_mass_rule`i' = mean(pm_mass_rule`i')
  3.         label var imp_mean_mass_rule`i' "Stack Week Mean kg/hr - rule `i'"
  4.         
.         ** Calculate stack's own week p25 kg/hr
.         bysort composite_id week: egen imp_p25_mass_rule`i' = pctile(pm_mass_rule`i'), p(25)
  5.         label var imp_p25_mass_rule`i' "Stack Week P25 kg/hr - rule `i'"
  6.         
.         ** Calculate stack's own week p50 kg/hr
.         bysort composite_id week: egen imp_p50_mass_rule`i' = pctile(pm_mass_rule`i'), p(50)
  7.         label var imp_p50_mass_rule`i' "Stack Week P50 kg/hr - rule `i'"
  8.         
.         ** Calculate stack's own week p75 kg/hr
.         bysort composite_id week: egen imp_p75_mass_rule`i' = pctile(pm_mass_rule`i'), p(75)
  9.         label var imp_p75_mass_rule`i' "Stack Week P75 kg/hr - rule `i'"
 10.         
.         ** Calculate stack's own week p90 kg/hr
.         bysort composite_id week: egen imp_p90_mass_rule`i' = pctile(pm_mass_rule`i'), p(90)
 11.         label var imp_p90_mass_rule`i' "Stack Week P90 kg/hr - rule `i'"
 12.         
.         tempfile helper_p90
 13.         save `helper_p90', replace
 14.         
.         ** Calculate stack's own 90 day p90 kg/hr leading up to this compliance period
.         tsset composite_id_enc date
 15.         mvsumm pm_mass_rule`i', stat(p90) win(90) gen(threemnthp90_mass_rule`i') force
 16.         bysort composite_id period: keep if _n == 1
 17.         keep composite_id period threemnthp90_mass_rule`i'
 18.         merge 1:m composite_id period using `helper_p90', nogen
 19.         
.         ** If all last three months missing then assign it the 8.08 we use when no data reported 
.         replace threemnthp90_mass_rule`i' = 8.08 if missing(threemnthp90_mass_rule`i')
 20.         
. }
(77,577 missing values generated)
(77,577 missing values generated)
(77,577 missing values generated)
(77,577 missing values generated)
(77,577 missing values generated)
(file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000001 not found)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000001 saved as .dta format

Panel variable: composite_id_enc (strongly balanced)
 Time variable: date, 16-Apr-19 to 31-Mar-21
         Delta: 1 day
(217,000 observations deleted)
(label _merge already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           221,960  
    -----------------------------------------
(49,895 real changes made)
(77,038 missing values generated)
(77,038 missing values generated)
(77,038 missing values generated)
(77,038 missing values generated)
(77,038 missing values generated)
(file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000002 not found)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000002 saved as .dta format

Panel variable: composite_id_enc (strongly balanced)
 Time variable: date, 16-Apr-19 to 31-Mar-21
         Delta: 1 day
(217,000 observations deleted)
(label _merge already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           221,960  
    -----------------------------------------
(49,797 real changes made)
(119,197 missing values generated)
(119,197 missing values generated)
(119,197 missing values generated)
(119,197 missing values generated)
(119,197 missing values generated)
(file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000003 not found)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000003 saved as .dta format

Panel variable: composite_id_enc (strongly balanced)
 Time variable: date, 16-Apr-19 to 31-Mar-21
         Delta: 1 day
(217,000 observations deleted)
(label _merge already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           221,960  
    -----------------------------------------
(103,217 real changes made)
(118,820 missing values generated)
(118,820 missing values generated)
(118,820 missing values generated)
(118,820 missing values generated)
(118,820 missing values generated)
(file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000004 not found)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000004 saved as .dta format

Panel variable: composite_id_enc (strongly balanced)
 Time variable: date, 16-Apr-19 to 31-Mar-21
         Delta: 1 day
(217,000 observations deleted)
(label _merge already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           221,960  
    -----------------------------------------
(103,186 real changes made)
(141,323 missing values generated)
(141,323 missing values generated)
(141,323 missing values generated)
(141,323 missing values generated)
(141,323 missing values generated)
(file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000005 not found)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000005 saved as .dta format

Panel variable: composite_id_enc (strongly balanced)
 Time variable: date, 16-Apr-19 to 31-Mar-21
         Delta: 1 day
(217,000 observations deleted)
(label _merge already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           221,960  
    -----------------------------------------
(130,016 real changes made)
(141,099 missing values generated)
(141,099 missing values generated)
(141,099 missing values generated)
(141,099 missing values generated)
(141,099 missing values generated)
(file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000006 not found)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000006 saved as .dta format

Panel variable: composite_id_enc (strongly balanced)
 Time variable: date, 16-Apr-19 to 31-Mar-21
         Delta: 1 day
(217,000 observations deleted)
(label _merge already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           221,960  
    -----------------------------------------
(130,016 real changes made)
(129,488 missing values generated)
(129,488 missing values generated)
(129,488 missing values generated)
(129,488 missing values generated)
(129,488 missing values generated)
(file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000007 not found)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000007 saved as .dta format

Panel variable: composite_id_enc (strongly balanced)
 Time variable: date, 16-Apr-19 to 31-Mar-21
         Delta: 1 day
(217,000 observations deleted)
(label _merge already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           221,960  
    -----------------------------------------
(115,460 real changes made)
(129,167 missing values generated)
(129,167 missing values generated)
(129,167 missing values generated)
(129,167 missing values generated)
(129,167 missing values generated)
(file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000008 not found)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000008 saved as .dta format

Panel variable: composite_id_enc (strongly balanced)
 Time variable: date, 16-Apr-19 to 31-Mar-21
         Delta: 1 day
(217,000 observations deleted)
(label _merge already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           221,960  
    -----------------------------------------
(115,460 real changes made)
(95,938 missing values generated)
(95,938 missing values generated)
(95,938 missing values generated)
(95,938 missing values generated)
(95,938 missing values generated)
(file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000009 not found)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000009 saved as .dta format

Panel variable: composite_id_enc (strongly balanced)
 Time variable: date, 16-Apr-19 to 31-Mar-21
         Delta: 1 day
(217,000 observations deleted)
(label _merge already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           221,960  
    -----------------------------------------
(75,419 real changes made)
(95,484 missing values generated)
(95,484 missing values generated)
(95,484 missing values generated)
(95,484 missing values generated)
(95,484 missing values generated)
(file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.00000a not found)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.00000a saved as .dta format

Panel variable: composite_id_enc (strongly balanced)
 Time variable: date, 16-Apr-19 to 31-Mar-21
         Delta: 1 day
(217,000 observations deleted)
(label _merge already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           221,960  
    -----------------------------------------
(75,367 real changes made)

. 
. 
. ********************************************************************************
. ******************** [4] CALCULATE WEEKLY/DAILY STACK IMPUTED MASS ********************
. ********************************************************************************
. 
. local tot_weekly_hrs = 168

. local week_5pc = 0.05*168 // for 100-95% DA bin

. local week_15pc = 0.15*168 // for 95-80% DA bin

. local week_30pc = 0.30*168 // for 80-50% DA bin

. local week_1pc = .01*168 // for less than 1% DA

. 
. local week_95pc = .95*168

. local week_80pc = .8*168

. local week_50pc = .5*168

. 
. forvalues i=0(1)9{      
  2. 
.         ***Categorize industry into imputation bin based on weekly data availability/non-reporting hours
.         ***Create a bin variable called cat = 0,1,2,3,4 with 5 if 100% weekly DA, and 0 if <1% weekly DA.
.         egen cat_rule`i' = cut(tot_weekly_report_hrs_rule`i'), at(0, `week_1pc', `week_50pc', `week_80pc', `week_95pc', `tot_weekly_hrs', 169) icodes
  3.         
.         ***Calculate imputed mass quantity based on graded imputation bin, using cat
.         // If report full week
.         gen stack_weekly_mass_imp_rule_mkt_`i' = 0 if cat_rule`i'== 5
  4.         // If have DA between 100 and 95
.         replace stack_weekly_mass_imp_rule_mkt_`i' = non_report_hrs_rule`i'*imp_mean_mass_rule`i' if cat_rule`i' == 4
  5.         // If have DA between 95 and 80
.         replace stack_weekly_mass_imp_rule_mkt_`i' = `week_5pc'*imp_mean_mass_rule`i' + ((non_report_hrs_rule`i'-`week_5pc')*imp_p75_mass_rule`i') if cat_rule`i' == 3
  6.         // If have DA between 80 and 50
.         replace stack_weekly_mass_imp_rule_mkt_`i' = `week_5pc'*imp_mean_mass_rule`i' + (`week_15pc'*imp_p75_mass_rule`i') + ((non_report_hrs_rule`i'-`week_5pc'-`week_15pc')*imp_p90_mass_rule`i') if cat_rule`i'== 2
  7.         // If have DA between 50 and 1
.         replace stack_weekly_mass_imp_rule_mkt_`i' = `week_5pc'*imp_mean_mass_rule`i' + (`week_15pc'*imp_p75_mass_rule`i') + (`week_30pc'*imp_p90_mass_rule`i') + ((non_report_hrs_rule`i'-`week_5pc'-`week_15pc'-`week_30pc')*threemnthp90_mass_rule`i') if 
> cat_rule`i'== 1
  8.         // If have DA less than 1
.         replace stack_weekly_mass_imp_rule_mkt_`i' = 168*8.08 if cat_rule`i'== 0 | missing(tot_weekly_report_hrs_rule`i')
  9.         
.         drop imp_p*_mass_rule`i'
 10.         foreach pct in 50 55 60 65 70 75 80 85 90 95 {
 11.                 bysort composite_id: egen imp_p`pct'_mass_rule`i' = pctile(pm_mass_rule`i') if ///
>                 (date >= td(16Jul2019)) & (D_interregnum_week == 0), p(`pct')
 12.                 
.                 gen stack_weekly_mass_imp_rule_p`pct'_`i' = non_report_hrs_rule`i'*imp_p`pct'_mass_rule`i'
 13.                 
.         }
 14.                 
.         
. *** B) Calculate PER DAY imputed emissions
.         foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
 15.                         ***TRANSLATE WEEKLY IMPUTED QUANTITY TO DAILY IMP QUANTITY BY DIVIDING IT BY 7. THIS IS MY WORKAROUND FOR DAILY APPLICATION OF WEEKLY MOC RULE.
.                         ***This is problematic, but StackDayPMMassRuleM.dta is nowhere used in the analysis.
.                         gen stack_daily_mass_imp_rule_`imprule'_`i' = stack_weekly_mass_imp_rule_`imprule'_`i'/7
 16.                         la var stack_daily_mass_imp_rule_`imprule'_`i' ///
>                                 "Stack-day Imputed Mass Emissions (kg) from CEMS Non-Reported Hours - rule`i'"
 17. 
.                         ** Correct for week of Diwali 2019 when imputation should be zero.
.                         replace stack_daily_mass_imp_rule_`imprule'_`i' = 0 if ///
>                                 date >= date("2019oct26", "YMD") & ///
>                                 date <= date("2019nov03", "YMD") & ///
>                                 stack_daily_mass_imp_rule_`imprule'_`i' != .
 18. 
.         }
 19. 
. }
(194,905 missing values generated)
(48,230 real changes made)
(27,532 real changes made)
(22,923 real changes made)
(18,091 real changes made)
(78,129 real changes made)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(2,476 real changes made)
(95,480 missing values generated)
(2,476 real changes made)
(95,480 missing values generated)
(2,476 real changes made)
(95,480 missing values generated)
(2,476 real changes made)
(95,480 missing values generated)
(2,476 real changes made)
(95,480 missing values generated)
(2,476 real changes made)
(95,480 missing values generated)
(2,476 real changes made)
(95,480 missing values generated)
(2,476 real changes made)
(95,480 missing values generated)
(2,476 real changes made)
(95,480 missing values generated)
(2,476 real changes made)
(95,480 missing values generated)
(2,476 real changes made)
(194,695 missing values generated)
(48,594 real changes made)
(27,644 real changes made)
(22,825 real changes made)
(18,055 real changes made)
(77,577 real changes made)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(95,480 missing values generated)
(2,469 real changes made)
(95,480 missing values generated)
(2,469 real changes made)
(95,480 missing values generated)
(2,469 real changes made)
(95,480 missing values generated)
(2,469 real changes made)
(95,480 missing values generated)
(2,469 real changes made)
(95,480 missing values generated)
(2,469 real changes made)
(95,480 missing values generated)
(2,469 real changes made)
(95,480 missing values generated)
(2,469 real changes made)
(95,480 missing values generated)
(2,469 real changes made)
(95,480 missing values generated)
(2,469 real changes made)
(95,480 missing values generated)
(2,469 real changes made)
(203,039 missing values generated)
(32,697 real changes made)
(20,084 real changes made)
(17,037 real changes made)
(13,612 real changes made)
(119,609 real changes made)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(2,587 real changes made)
(138,320 missing values generated)
(1,642 real changes made)
(138,320 missing values generated)
(1,642 real changes made)
(138,320 missing values generated)
(1,642 real changes made)
(138,320 missing values generated)
(1,642 real changes made)
(138,320 missing values generated)
(1,642 real changes made)
(138,320 missing values generated)
(1,642 real changes made)
(138,320 missing values generated)
(1,642 real changes made)
(138,320 missing values generated)
(1,642 real changes made)
(138,320 missing values generated)
(1,642 real changes made)
(138,320 missing values generated)
(1,642 real changes made)
(202,899 missing values generated)
(32,949 real changes made)
(20,154 real changes made)
(17,016 real changes made)
(13,547 real changes made)
(119,233 real changes made)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(138,320 missing values generated)
(2,580 real changes made)
(138,320 missing values generated)
(1,635 real changes made)
(138,320 missing values generated)
(1,635 real changes made)
(138,320 missing values generated)
(1,635 real changes made)
(138,320 missing values generated)
(1,635 real changes made)
(138,320 missing values generated)
(1,635 real changes made)
(138,320 missing values generated)
(1,635 real changes made)
(138,320 missing values generated)
(1,635 real changes made)
(138,320 missing values generated)
(1,635 real changes made)
(138,320 missing values generated)
(1,635 real changes made)
(138,320 missing values generated)
(1,635 real changes made)
(207,673 missing values generated)
(24,857 real changes made)
(15,884 real changes made)
(13,900 real changes made)
(11,346 real changes made)
(141,686 real changes made)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(2,660 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(207,554 missing values generated)
(25,081 real changes made)
(15,940 real changes made)
(13,816 real changes made)
(11,254 real changes made)
(141,463 real changes made)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(157,496 missing values generated)
(2,660 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(157,496 missing values generated)
(1,292 real changes made)
(205,076 missing values generated)
(29,414 real changes made)
(18,194 real changes made)
(15,427 real changes made)
(12,183 real changes made)
(129,858 real changes made)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(2,616 real changes made)
(147,296 missing values generated)
(1,473 real changes made)
(147,296 missing values generated)
(1,473 real changes made)
(147,296 missing values generated)
(1,473 real changes made)
(147,296 missing values generated)
(1,473 real changes made)
(147,296 missing values generated)
(1,473 real changes made)
(147,296 missing values generated)
(1,473 real changes made)
(147,296 missing values generated)
(1,473 real changes made)
(147,296 missing values generated)
(1,473 real changes made)
(147,296 missing values generated)
(1,473 real changes made)
(147,296 missing values generated)
(1,473 real changes made)
(204,943 missing values generated)
(29,659 real changes made)
(18,285 real changes made)
(15,329 real changes made)
(12,132 real changes made)
(129,538 real changes made)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(147,296 missing values generated)
(2,609 real changes made)
(147,296 missing values generated)
(1,466 real changes made)
(147,296 missing values generated)
(1,466 real changes made)
(147,296 missing values generated)
(1,466 real changes made)
(147,296 missing values generated)
(1,466 real changes made)
(147,296 missing values generated)
(1,466 real changes made)
(147,296 missing values generated)
(1,466 real changes made)
(147,296 missing values generated)
(1,466 real changes made)
(147,296 missing values generated)
(1,466 real changes made)
(147,296 missing values generated)
(1,466 real changes made)
(147,296 missing values generated)
(1,466 real changes made)
(197,670 missing values generated)
(41,573 real changes made)
(24,067 real changes made)
(20,025 real changes made)
(15,613 real changes made)
(96,392 real changes made)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(2,530 real changes made)
(118,736 missing values generated)
(2,017 real changes made)
(118,736 missing values generated)
(2,017 real changes made)
(118,736 missing values generated)
(2,017 real changes made)
(118,736 missing values generated)
(2,017 real changes made)
(118,736 missing values generated)
(2,017 real changes made)
(118,736 missing values generated)
(2,017 real changes made)
(118,736 missing values generated)
(2,017 real changes made)
(118,736 missing values generated)
(2,017 real changes made)
(118,736 missing values generated)
(2,017 real changes made)
(118,736 missing values generated)
(2,017 real changes made)
(197,460 missing values generated)
(41,909 real changes made)
(24,088 real changes made)
(20,025 real changes made)
(15,513 real changes made)
(95,925 real changes made)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(118,736 missing values generated)
(2,521 real changes made)
(118,736 missing values generated)
(2,008 real changes made)
(118,736 missing values generated)
(2,008 real changes made)
(118,736 missing values generated)
(2,008 real changes made)
(118,736 missing values generated)
(2,008 real changes made)
(118,736 missing values generated)
(2,008 real changes made)
(118,736 missing values generated)
(2,008 real changes made)
(118,736 missing values generated)
(2,008 real changes made)
(118,736 missing values generated)
(2,008 real changes made)
(118,736 missing values generated)
(2,008 real changes made)
(118,736 missing values generated)
(2,008 real changes made)

. 
. ********************************************************************************
. ******************* [5] CALCULATE DAILY STACK VALIDATED MASS *******************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2. 
.         foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                 ** Calculate validated DAY emissions per stack
.                 gen stack_daily_mass_val_rule_`imprule'_`i' = stack_daily_mass_actual_rule`i' + stack_daily_mass_imp_rule_`imprule'_`i'
  4.                 replace stack_daily_mass_val_rule_`imprule'_`i' = stack_daily_mass_imp_rule_`imprule'_`i' ///
>                         if stack_daily_mass_val_rule_`imprule'_`i' == .
  5.                 la var stack_daily_mass_val_rule_`imprule'_`i' ///
>                         "Stack Day Validated Mass Emissions (kg) (=Stack-day Actual + Stack-day Imp) - rule `i'"
  6.         }
  7. 
. }
(92,287 missing values generated)
(92,287 real changes made)
note: label truncated to 80 characters
(129,393 missing values generated)
(33,913 real changes made)
note: label truncated to 80 characters
(129,393 missing values generated)
(33,913 real changes made)
note: label truncated to 80 characters
(129,393 missing values generated)
(33,913 real changes made)
note: label truncated to 80 characters
(129,393 missing values generated)
(33,913 real changes made)
note: label truncated to 80 characters
(129,393 missing values generated)
(33,913 real changes made)
note: label truncated to 80 characters
(129,393 missing values generated)
(33,913 real changes made)
note: label truncated to 80 characters
(129,393 missing values generated)
(33,913 real changes made)
note: label truncated to 80 characters
(129,393 missing values generated)
(33,913 real changes made)
note: label truncated to 80 characters
(129,393 missing values generated)
(33,913 real changes made)
note: label truncated to 80 characters
(129,393 missing values generated)
(33,913 real changes made)
note: label truncated to 80 characters
(91,628 missing values generated)
(91,628 real changes made)
note: label truncated to 80 characters
(128,920 missing values generated)
(33,440 real changes made)
note: label truncated to 80 characters
(128,920 missing values generated)
(33,440 real changes made)
note: label truncated to 80 characters
(128,920 missing values generated)
(33,440 real changes made)
note: label truncated to 80 characters
(128,920 missing values generated)
(33,440 real changes made)
note: label truncated to 80 characters
(128,920 missing values generated)
(33,440 real changes made)
note: label truncated to 80 characters
(128,920 missing values generated)
(33,440 real changes made)
note: label truncated to 80 characters
(128,920 missing values generated)
(33,440 real changes made)
note: label truncated to 80 characters
(128,920 missing values generated)
(33,440 real changes made)
note: label truncated to 80 characters
(128,920 missing values generated)
(33,440 real changes made)
note: label truncated to 80 characters
(128,920 missing values generated)
(33,440 real changes made)
note: label truncated to 80 characters
(130,102 missing values generated)
(130,102 real changes made)
note: label truncated to 80 characters
(157,959 missing values generated)
(19,639 real changes made)
note: label truncated to 80 characters
(157,959 missing values generated)
(19,639 real changes made)
note: label truncated to 80 characters
(157,959 missing values generated)
(19,639 real changes made)
note: label truncated to 80 characters
(157,959 missing values generated)
(19,639 real changes made)
note: label truncated to 80 characters
(157,959 missing values generated)
(19,639 real changes made)
note: label truncated to 80 characters
(157,959 missing values generated)
(19,639 real changes made)
note: label truncated to 80 characters
(157,959 missing values generated)
(19,639 real changes made)
note: label truncated to 80 characters
(157,959 missing values generated)
(19,639 real changes made)
note: label truncated to 80 characters
(157,959 missing values generated)
(19,639 real changes made)
note: label truncated to 80 characters
(157,959 missing values generated)
(19,639 real changes made)
note: label truncated to 80 characters
(129,628 missing values generated)
(129,628 real changes made)
note: label truncated to 80 characters
(157,631 missing values generated)
(19,311 real changes made)
note: label truncated to 80 characters
(157,631 missing values generated)
(19,311 real changes made)
note: label truncated to 80 characters
(157,631 missing values generated)
(19,311 real changes made)
note: label truncated to 80 characters
(157,631 missing values generated)
(19,311 real changes made)
note: label truncated to 80 characters
(157,631 missing values generated)
(19,311 real changes made)
note: label truncated to 80 characters
(157,631 missing values generated)
(19,311 real changes made)
note: label truncated to 80 characters
(157,631 missing values generated)
(19,311 real changes made)
note: label truncated to 80 characters
(157,631 missing values generated)
(19,311 real changes made)
note: label truncated to 80 characters
(157,631 missing values generated)
(19,311 real changes made)
note: label truncated to 80 characters
(157,631 missing values generated)
(19,311 real changes made)
note: label truncated to 80 characters
(150,375 missing values generated)
(150,375 real changes made)
note: label truncated to 80 characters
(173,193 missing values generated)
(15,697 real changes made)
note: label truncated to 80 characters
(173,193 missing values generated)
(15,697 real changes made)
note: label truncated to 80 characters
(173,193 missing values generated)
(15,697 real changes made)
note: label truncated to 80 characters
(173,193 missing values generated)
(15,697 real changes made)
note: label truncated to 80 characters
(173,193 missing values generated)
(15,697 real changes made)
note: label truncated to 80 characters
(173,193 missing values generated)
(15,697 real changes made)
note: label truncated to 80 characters
(173,193 missing values generated)
(15,697 real changes made)
note: label truncated to 80 characters
(173,193 missing values generated)
(15,697 real changes made)
note: label truncated to 80 characters
(173,193 missing values generated)
(15,697 real changes made)
note: label truncated to 80 characters
(173,193 missing values generated)
(15,697 real changes made)
note: label truncated to 80 characters
(150,008 missing values generated)
(150,008 real changes made)
note: label truncated to 80 characters
(172,942 missing values generated)
(15,446 real changes made)
note: label truncated to 80 characters
(172,942 missing values generated)
(15,446 real changes made)
note: label truncated to 80 characters
(172,942 missing values generated)
(15,446 real changes made)
note: label truncated to 80 characters
(172,942 missing values generated)
(15,446 real changes made)
note: label truncated to 80 characters
(172,942 missing values generated)
(15,446 real changes made)
note: label truncated to 80 characters
(172,942 missing values generated)
(15,446 real changes made)
note: label truncated to 80 characters
(172,942 missing values generated)
(15,446 real changes made)
note: label truncated to 80 characters
(172,942 missing values generated)
(15,446 real changes made)
note: label truncated to 80 characters
(172,942 missing values generated)
(15,446 real changes made)
note: label truncated to 80 characters
(172,942 missing values generated)
(15,446 real changes made)
note: label truncated to 80 characters
(139,293 missing values generated)
(139,293 real changes made)
note: label truncated to 80 characters
(164,738 missing values generated)
(17,442 real changes made)
note: label truncated to 80 characters
(164,738 missing values generated)
(17,442 real changes made)
note: label truncated to 80 characters
(164,738 missing values generated)
(17,442 real changes made)
note: label truncated to 80 characters
(164,738 missing values generated)
(17,442 real changes made)
note: label truncated to 80 characters
(164,738 missing values generated)
(17,442 real changes made)
note: label truncated to 80 characters
(164,738 missing values generated)
(17,442 real changes made)
note: label truncated to 80 characters
(164,738 missing values generated)
(17,442 real changes made)
note: label truncated to 80 characters
(164,738 missing values generated)
(17,442 real changes made)
note: label truncated to 80 characters
(164,738 missing values generated)
(17,442 real changes made)
note: label truncated to 80 characters
(164,738 missing values generated)
(17,442 real changes made)
note: label truncated to 80 characters
(138,863 missing values generated)
(138,863 real changes made)
note: label truncated to 80 characters
(164,438 missing values generated)
(17,142 real changes made)
note: label truncated to 80 characters
(164,438 missing values generated)
(17,142 real changes made)
note: label truncated to 80 characters
(164,438 missing values generated)
(17,142 real changes made)
note: label truncated to 80 characters
(164,438 missing values generated)
(17,142 real changes made)
note: label truncated to 80 characters
(164,438 missing values generated)
(17,142 real changes made)
note: label truncated to 80 characters
(164,438 missing values generated)
(17,142 real changes made)
note: label truncated to 80 characters
(164,438 missing values generated)
(17,142 real changes made)
note: label truncated to 80 characters
(164,438 missing values generated)
(17,142 real changes made)
note: label truncated to 80 characters
(164,438 missing values generated)
(17,142 real changes made)
note: label truncated to 80 characters
(164,438 missing values generated)
(17,142 real changes made)
note: label truncated to 80 characters
(108,680 missing values generated)
(108,680 real changes made)
note: label truncated to 80 characters
(141,714 missing values generated)
(22,978 real changes made)
note: label truncated to 80 characters
(141,714 missing values generated)
(22,978 real changes made)
note: label truncated to 80 characters
(141,714 missing values generated)
(22,978 real changes made)
note: label truncated to 80 characters
(141,714 missing values generated)
(22,978 real changes made)
note: label truncated to 80 characters
(141,714 missing values generated)
(22,978 real changes made)
note: label truncated to 80 characters
(141,714 missing values generated)
(22,978 real changes made)
note: label truncated to 80 characters
(141,714 missing values generated)
(22,978 real changes made)
note: label truncated to 80 characters
(141,714 missing values generated)
(22,978 real changes made)
note: label truncated to 80 characters
(141,714 missing values generated)
(22,978 real changes made)
note: label truncated to 80 characters
(141,714 missing values generated)
(22,978 real changes made)
note: label truncated to 80 characters
(108,095 missing values generated)
(108,095 real changes made)
note: label truncated to 80 characters
(141,301 missing values generated)
(22,565 real changes made)
note: label truncated to 80 characters
(141,301 missing values generated)
(22,565 real changes made)
note: label truncated to 80 characters
(141,301 missing values generated)
(22,565 real changes made)
note: label truncated to 80 characters
(141,301 missing values generated)
(22,565 real changes made)
note: label truncated to 80 characters
(141,301 missing values generated)
(22,565 real changes made)
note: label truncated to 80 characters
(141,301 missing values generated)
(22,565 real changes made)
note: label truncated to 80 characters
(141,301 missing values generated)
(22,565 real changes made)
note: label truncated to 80 characters
(141,301 missing values generated)
(22,565 real changes made)
note: label truncated to 80 characters
(141,301 missing values generated)
(22,565 real changes made)
note: label truncated to 80 characters
(141,301 missing values generated)
(22,565 real changes made)
note: label truncated to 80 characters

. 
. /*******************************************************************************
>            NOW READY TO MAKE THE DEPENDENT VARIABLE FOR REGRESSIONS IN PART 6 
>            (6. TREATMENT EFFECT ANALYSIS). THIS VAR IS PLANT MONTH MASS (KG).
> 
>            STEPS TO CREATE THIS VARIABLE WILL BE:
> 
>            6.1) CALCULATE STACK WEEK MASS (KG), AND THEN PLANT WEEK MASS (KG).
>            FIRST GENERATE THESE VARIABLES IN THE STACK-DAY LEVEL DATA SET.
>            AND SAVE IT FOR FUTURE USE IF NEEDED ("_StackDayLevel.dta").
> 
>            6.2) THEN, COLLAPSE THE STACK-DAY LEVEL DATA SET TO KEEP ONE DATA POINT 
>            PER PLANT PER WEEK ("_PlantWeekLevel.dta"). 
> 
>            CONTAINS THE DEPENDENT VARIABLE: PLANT-WEEK MASS (KG) EMISSIONS 
>            USING IMPUTATION RULE 0a.
>    ****************************************************************************/
. 
. preserve

. keep date composite_id gpcb_id treatmentstatus stack_daily_mass_actual_rule0 stack_daily_mass_imp_rule*0 stack_daily_mass_val_rule*0

. order date composite_id gpcb_id treatmentstatus stack_daily_mass_actual_rule0 stack_daily_mass_imp_rule*0 stack_daily_mass_val_rule*0

. rename stack_daily_mass_actual_rule*0 stack_daily_mass_actual_*M

. rename stack_daily_mass_imp_rule*0 stack_daily_mass_imp_*M

. rename stack_daily_mass_val_rule*0 stack_daily_mass_val_*M 

. sort date gpcb_id composite_id

. save "$IMPUTATION_DATA_OUT/StackDayPMMassRuleM.dta", replace
(file 02DataPipeline/emissions/imputation/StackDayPMMassRuleM.dta not found)
file 02DataPipeline/emissions/imputation/StackDayPMMassRuleM.dta saved

. 
. restore

. 
. 
. /*******************************************************************************
>            NOW READY TO MAKE THE DEPENDENT VARIABLE FOR REGRESSIONS IN PART 6 
>            (6. TREATMENT EFFECT ANALYSIS). THIS VAR IS PLANT MONTH MASS (KG).
> 
>            STEPS TO CREATE THIS VARIABLE WILL BE:
> 
>            6.1) CALCULATE STACK MONTH MASS (KG), AND THEN PLANT MONTH MASS (KG).
>            FIRST GENERATE THESE VARIABLES IN THE STACK-DAY LEVEL DATA SET 
>            AND SAVE IT FOR FUTURE USE IF NEEDED ("_StackDayLevel.dta").
> 
>            6.2) THEN, COLLAPSE THE STACK-DAY LEVEL DATA SET TO KEEP ONE DATA POINT 
>            PER PLANT PER MONTH ("_PlantMonthLevel.dta"). 
> 
>            CONTAINS THE DEPENDENT VARIABLE: PLANT-MONTH MASS (KG) EMISSIONS 
>            USING IMPUTATION RULE 1a.
>    ****************************************************************************/
. 
. preserve

.    
. ********************************************************************************
. ********************* [6] GENERATE STACK-MONTH MASS (KG) *********************
. ********************************************************************************
. 
. forvalues i=0(1)9{      
  2.         
.         foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3. 
.                 ** Calculates MONTHLY validated emissions PER STACK
.                 bysort composite_id month16: egen stack_month_mass_val_rule_`imprule'_`i' = sum(stack_daily_mass_val_rule_`imprule'_`i')
  4.                 bysort composite_id month16: egen miss_stack_month_mass_val_`imprule' = max(missing(stack_daily_mass_val_rule_`imprule'_`i'))
  5.                 replace stack_month_mass_val_rule_`imprule'_`i' = . if miss_stack_month_mass_val_`imprule' == 1
  6.                 la var stack_month_mass_val_rule_`imprule'_`i' ///
>                         "Stack-month Validated Mass Emissions (kg)"
  7.                 drop miss_stack_month_mass_val_`imprule'
  8.         
.         }
  9. 
. }       
(0 real changes made)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(0 real changes made)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(103,850 real changes made, 103,850 to missing)
(0 real changes made)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(0 real changes made)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(143,855 real changes made, 143,855 to missing)
(0 real changes made)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(0 real changes made)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(161,762 real changes made, 161,762 to missing)
(0 real changes made)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(0 real changes made)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(152,237 real changes made, 152,237 to missing)
(0 real changes made)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(0 real changes made)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)
(125,567 real changes made, 125,567 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id month16: gen dump=_n

. bysort composite_id month16: keep if _n==_N     
(214,520 observations deleted)

. keep composite_id industry_id gpcb_id month16 treatmentstatus stack_month_mass_val* 

. ** 7,440 observations. 310 stacks. 24 months from April 2019 to March 2021.
. 
. ******************** [6b] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. 
. /**     AS PER NICK'S INSTRUCTION ON WEEKLY CALL 01 DEC 2020: FOR PLANTS WITH >1 STACK, 
>         WE WILL ONLY CALCULATE THEIR PLANT MASS (KG) SUM IF ALL STACKS ARE CONNECTED. 
>         IF STACKS ARE PARTIALLY CONNECTED (i.e., ONLY 1 OF 3 STACKS CONNECTED), 
>         THE ENTIRE PLANT SUM WILL BE MISSING.   **/
. 
. forvalues i=0(1)9{
  2.         
.         foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3. 
.         ** Calculate MONTHLY validated emissions PER PLANT
.         bysort gpcb_id month16: egen ind_month_mass_val_rule_`imprule'_`i' = sum(stack_month_mass_val_rule_`imprule'_`i')
  4.         bysort gpcb_id month16: egen miss_ind_month_mass_val_`imprule' = max(missing(stack_month_mass_val_rule_`imprule'_`i'))
  5.         replace ind_month_mass_val_rule_`imprule'_`i' = . if miss_ind_month_mass_val_`imprule' == 1
  6.         la var stack_month_mass_val_rule_`imprule'_`i' ///
>                 "Plant-month Validated Mass Emissions (kg) - rule `i'"
  7.         drop miss_ind_month_mass_val_`imprule'
  8.         
.         }
  9.         
. }
(0 real changes made)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(0 real changes made)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(3,410 real changes made, 3,410 to missing)
(0 real changes made)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(0 real changes made)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(4,775 real changes made, 4,775 to missing)
(0 real changes made)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(0 real changes made)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(5,386 real changes made, 5,386 to missing)
(0 real changes made)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(0 real changes made)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(5,061 real changes made, 5,061 to missing)
(0 real changes made)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(0 real changes made)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)
(4,151 real changes made, 4,151 to missing)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id month16: gen dump=_n

. bysort gpcb_id month16: keep if _n==_N
(432 observations deleted)

. keep industry_id gpcb_id month16 treatmentstatus ind_month_mass_val* 

. ** 7,008 observations. 292 plants. 24 months from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/PlantMonthPMMassRuleM.dta", replace
(file 02DataPipeline/emissions/imputation/PlantMonthPMMassRuleM.dta not found)
file 02DataPipeline/emissions/imputation/PlantMonthPMMassRuleM.dta saved

. 
. restore

. 
. preserve

. 
. ********************************************************************************
. ********************* [7] GENERATE STACK-WEEK MASS (KG) **********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2. 
.         foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                 ** Calculate WEEKLY validated emissions PER STACK
.                 bysort composite_id week: egen stack_week_mass_val_rule_`imprule'_`i' = sum(stack_daily_mass_val_rule_`imprule'_`i')
  4.                 bysort composite_id week: egen miss_stack_week_mass_val_`imprule' = max(missing(stack_daily_mass_val_rule_`imprule'_`i'))
  5.                 replace stack_week_mass_val_rule_`imprule'_`i' = . if miss_stack_week_mass_val_`imprule' == 1
  6.                 la var stack_week_mass_val_rule_`imprule'_`i' ///
>                         "Stack-week Validated Mass Emissions (kg) - rule `i'"
  7.                 drop miss_stack_week_mass_val_`imprule'
  8.                 
.         }
  9. 
. }
(0 real changes made)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(0 real changes made)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(97,340 real changes made, 97,340 to missing)
(0 real changes made)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(0 real changes made)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(139,550 real changes made, 139,550 to missing)
(0 real changes made)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(0 real changes made)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(158,444 real changes made, 158,444 to missing)
(0 real changes made)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(0 real changes made)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(148,394 real changes made, 148,394 to missing)
(0 real changes made)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(0 real changes made)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)
(120,254 real changes made, 120,254 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id week: gen dump=_n

. bysort composite_id week: keep if _n==_N        
(190,030 observations deleted)

. keep composite_id industry_id gpcb_id week treatmentstatus stack_week_mass_val*

. ** 31,930 Observations. 310 Stacks. 103 weeks from April 2019 to March 2021.
. 
. ******************** [7b] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. 
. forvalues i=0(1)9{
  2. 
.         foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                 ** Calculate WEEKLY validated emissions PER PLANT
.                 bysort gpcb_id week: egen ind_week_mass_val_rule_`imprule'_`i' = sum(stack_week_mass_val_rule_`imprule'_`i')
  4.                 bysort gpcb_id week: egen miss_ind_week_mass_val_`imprule' = max(missing(stack_week_mass_val_rule_`imprule'_`i'))
  5.                 replace ind_week_mass_val_rule_`imprule'_`i' = . if miss_ind_week_mass_val_`imprule' == 1
  6.                 la var stack_week_mass_val_rule_`imprule'_`i' ///
>                         "Plant-week Validated Mass Emissions (kg) - rule `i'"
  7.                 drop miss_ind_week_mass_val_`imprule'
  8.                 
.         }
  9. 
. }
(0 real changes made)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(0 real changes made)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(13,950 real changes made, 13,950 to missing)
(0 real changes made)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(0 real changes made)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(20,040 real changes made, 20,040 to missing)
(0 real changes made)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(0 real changes made)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(22,766 real changes made, 22,766 to missing)
(0 real changes made)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(0 real changes made)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(21,316 real changes made, 21,316 to missing)
(0 real changes made)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(0 real changes made)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)
(17,256 real changes made, 17,256 to missing)

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id week: gen dump=_n

. bysort gpcb_id week: keep if _n==_N
(1,854 observations deleted)

. keep industry_id gpcb_id week treatmentstatus ind_week_mass_val* 

. ** 30,076 Observations. 292 Plants. 103 weeks from April 2019 to March 2021.
. 
. save "$IMPUTATION_DATA_OUT/PlantWeekPMMassRuleM.dta", replace
(file 02DataPipeline/emissions/imputation/PlantWeekPMMassRuleM.dta not found)
file 02DataPipeline/emissions/imputation/PlantWeekPMMassRuleM.dta saved

. 
. restore

. 
. preserve 

. 
. ********************************************************************************
. ********************* [8] GENERATE STACK-PERIOD MASS (KG) ********************
. ********************************************************************************
. 
. forvalues i=0(1)9{
  2.         
.         foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3. 
.                 ** Calculate MONTHLY validated emissions PER STACK
.                 bysort composite_id period: egen stack_period_mass_val_rule_`imprule'_`i' = sum(stack_daily_mass_val_rule_`imprule'_`i')
  4.                 bysort composite_id period: egen miss_stack_period_mass_val_`imprule' = max(missing(stack_daily_mass_val_rule_`imprule'_`i'))
  5.                 replace stack_period_mass_val_rule_`imprule'_`i' = . if miss_stack_period_mass_val_`imprule' == 1
  6.                 la var stack_period_mass_val_rule_`imprule'_`i' ///
>                         "Stack-period Validated Mass Emissions (kg) - rule `i'"
  7.                 drop miss_stack_period_mass_val_`imprule'
  8.         
.         }
  9. 
. }
(0 real changes made)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(0 real changes made)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(106,020 real changes made, 106,020 to missing)
(0 real changes made)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(0 real changes made)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(145,290 real changes made, 145,290 to missing)
(0 real changes made)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(0 real changes made)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(162,868 real changes made, 162,868 to missing)
(0 real changes made)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(0 real changes made)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(153,518 real changes made, 153,518 to missing)
(0 real changes made)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(0 real changes made)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)
(127,338 real changes made, 127,338 to missing)

. 
. ** Keep one monthly data point for each STACK
. bysort composite_id period: gen dump=_n

. bysort composite_id period: keep if _n==_N      
(217,000 observations deleted)

. keep composite_id industry_id gpcb_id period period_length treatmentstatus stack_period_mass_val* 

. ** 3,410 observations. 310 stacks. 11 periods.
. 
. ******************** [8b] COLLAPSE TO PLANT-LEVEL DATA SET ********************
. 
. /**     AS PER NICK'S INSTRUCTION ON WEEKLY CALL 01 DEC 2020: FOR PLANTS WITH >1 STACK, 
>            WE WILL ONLY CALCULATE THEIR PLANT MASS (KG) SUM IF ALL STACKS ARE CONNECTED. 
>            IF STACKS ARE PARTIALLY CONNECTED (i.e., ONLY 1 OF 3 STACKS CONNECTED), 
>    THE ENTIRE PLANT SUM WILL BE MISSING.        **/
. 
. forvalues i=0(1)9{
  2. 
.         foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                 ** Calculate MONTHLY validated emissions PER PLANT
.                 bysort gpcb_id period: egen ind_period_mass_val_rule_`imprule'_`i' = sum(stack_period_mass_val_rule_`imprule'_`i')
  4.                 bysort gpcb_id period: egen miss_ind_period_mass_val_`imprule' = max(missing(stack_period_mass_val_rule_`imprule'_`i'))
  5.                 replace ind_period_mass_val_rule_`imprule'_`i' = . if miss_ind_period_mass_val_`imprule' == 1
  6.                 la var ind_period_mass_val_rule_`imprule'_`i' ///
>                         "Plant-month Validated Mass Emissions (kg) - rule `i'"
  7.                 drop miss_ind_period_mass_val_`imprule'
  8.                 
.         }
  9. 
. }
(0 real changes made)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(0 real changes made)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(1,240 real changes made, 1,240 to missing)
(0 real changes made)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(0 real changes made)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(2,500 real changes made, 2,500 to missing)
(0 real changes made)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(0 real changes made)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(3,064 real changes made, 3,064 to missing)
(0 real changes made)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(0 real changes made)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(2,764 real changes made, 2,764 to missing)
(0 real changes made)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(0 real changes made)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)
(1,924 real changes made, 1,924 to missing)

. 
. gen temp = 1

. bysort gpcb_id: egen num_stack = sum(temp)

. replace num_stack = num_stack / 16
(4,960 real changes made)

. drop temp

. 
. ** Keep one monthly data point for each PLANT
. bysort gpcb_id period: gen dump=_n

. bysort gpcb_id period: keep if _n==_N
(288 observations deleted)

. keep industry_id gpcb_id period period_length treatmentstatus num_stack ind_period_mass_val* 

. keep if period > 0
(292 observations deleted)

. ** 2,920 observations. 292 plants. 16 periods.
. 
. save "$IMPUTATION_DATA_OUT/PlantPeriodPMMassRuleM.dta", replace
(file 02DataPipeline/emissions/imputation/PlantPeriodPMMassRuleM.dta not found)
file 02DataPipeline/emissions/imputation/PlantPeriodPMMassRuleM.dta saved

. 
end of do-file

. 
. 
. * Clean baseline covariates
. do "$CODE_DIR/clean_baseline_covariates.do"

. /*******************************************************************************
>            Purpose: Compile baseline covariates.
>    ****************************************************************************/
.    
. set more off

. clear matrix

. clear all

. pause on

. 
. use "$BASELINE_DATA_IN/Master ETS In-sample - Plants (318i).dta", clear
('IN-SAMPLE' ETS MASTER. 318 INDS. +TREATMENT)

. 
. ** MERGE IN BASELINE COVARIATES
. merge m:1 industry_id using "$BASELINE_DATA_IN/BaselineCovariates_318i.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               318  (_merge==3)
    -----------------------------------------

. tab _merge // All matched

   Matching result from |
                  merge |      Freq.     Percent        Cum.
------------------------+-----------------------------------
            Matched (3) |        318      100.00      100.00
------------------------+-----------------------------------
                  Total |        318      100.00

. keep if _merge == 3
(0 observations deleted)

. drop _merge

. 
. ** D_treatment, official_ets_assignment, treatmentstatus all coincide
. tab D_treatment official_ets_assignment

1=Treatmen |     Official ETS
        t, |      Assignment
 0=Control |   Control  Treatment |     Total
-----------+----------------------+----------
         0 |       156          0 |       156 
         1 |         0        162 |       162 
-----------+----------------------+----------
     Total |       156        162 |       318 

. tab treatmentstatus official_ets_assignment

  Official |     Official ETS
       ETS |      Assignment
Assignment |   Control  Treatment |     Total
-----------+----------------------+----------
   Control |       156          0 |       156 
 Treatment |         0        162 |       162 
-----------+----------------------+----------
     Total |       156        162 |       318 

. tab treatmentstatus D_treatment

  Official |     1=Treatment,
       ETS |       0=Control
Assignment |         0          1 |     Total
-----------+----------------------+----------
   Control |       156          0 |       156 
 Treatment |         0        162 |       162 
-----------+----------------------+----------
     Total |       156        162 |       318 

. 
. drop treatmentstatus

. rename official_ets_assignment treatmentstatus

. order treatmentstatus, a(gpcb_id)

. order D_treatment, a(treatmentstatus)

. label var treatmentstatus "'T'=Treatment, 'C'=Control" 

. 
. sort gpcb_id

. drop comment

. 
. ********************************************************************************
. ***************** [1] DUMMIES FOR MISSING VALUES OF COVARIATES *****************
. ********************************************************************************
. 
. gen D_plant_boi_cap_missing = plant_boi_cap == .

. order D_plant_boi_cap, a(plant_boi_cap)

. label var D_plant_boi_cap "1=Plant Boiler Capacity missing"

. 
. gen D_bh_total_capex_missing = bh_total_capex == .

. order D_bh_total_capex_missing, a(bh_total_capex)

. label var D_bh_total_capex_missing "1=Boiler House CapEx missing"

. 
. gen D_bh_total_workers_missing = bh_total_workers == .

. order D_bh_total_workers_missing, a(bh_total_workers)

. label var D_bh_total_workers_missing "1=Boiler Employment missing"

. 
. rename mean_boiler_year boi_year

. gen D_boi_year_missing = boi_year == .

. order D_boi_year_missing, a(boi_year)

. label var D_boi_year_missing "1=Mean Boiler Year missing"

. 
. rename bh_annu_ope_cost_lakh bh_ope_cost

. gen D_bh_ope_cost_missing = bh_ope_cost == .    

. order D_bh_ope_cost_missing, a(bh_ope_cost)

. label var D_bh_ope_cost_missing "1=2018 BH Operating Cost missing"

. 
. ** Having made the dummies for missing values,
. ** now replace missing values in control vars to zero (per Nick's instruction).
. 
. replace plant_boi_cap = 0 if plant_boi_cap == .
(0 real changes made)

. replace bh_total_capex = 0 if bh_total_capex == .
(34 real changes made)

. replace bh_total_workers = 0 if bh_total_workers == .
(14 real changes made)

. replace boi_year = 0 if boi_year == .
(31 real changes made)

. replace bh_ope_cost = 0 if bh_ope_cost == .
(14 real changes made)

. 
. ********************************************************************************
. ******************************* [2] MAKE LOG VARS ******************************
. ********************************************************************************
. 
. gen ln_capex = ln(bh_total_capex)
(34 missing values generated)

. gen D_ln_capex_missing = ln_capex == .

. replace ln_capex = 0 if ln_capex == .
(34 real changes made)

. label var ln_capex "Ln(Boiler House CapEx)"

. label var D_ln_capex_missing "1=Ln(Boiler House CapEx) missing"

. 
. gen ln_boicap = ln(plant_boi_cap)
(16 missing values generated)

. gen D_ln_boicap_missing = ln_boicap == .

. replace ln_boicap = 0 if ln_boicap == .
(16 real changes made)

. label var ln_boicap "Ln(Plant Boiler Capacity)"

. label var D_ln_boicap_missing "1=Ln(Plant Total Boiler Capacity) missing"

. 
. gen ln_plant_total_heatoutput = ln(plant_total_heatoutput)      // None missing.

. label var ln_plant_total_heatoutput "Ln(Plant Total Heat Output)"

. order ln_plant_total_heatoutput, a(plant_total_heatoutput)

. 
. gen ln_opecost = ln(bh_ope_cost)
(14 missing values generated)

. gen D_ln_opecost_missing = ln_opecost == .

. replace ln_opecost = 0 if ln_opecost == .
(14 real changes made)

. label var ln_opecost "Ln(2018 BH Operating Cost)"

. label var D_ln_opecost_missing "1=Ln(2018 BH Operating Cost) missing"

. 
. ********************************************************************************
. ***************************** [3] CONVERT CURRENCY *****************************
. ********************************************************************************
. 
. gen grossrev_17_18_clean_USD = grossrev_17_18_clean * 10000000 / $USD2INR
(27 missing values generated)

. label var grossrev_17_18_clean_USD "2017 Gross Sales Revenue (USD)"

. 
. gen bh_total_capex_USD = bh_total_capex * 100000 / $USD2INR

. label var bh_total_capex_USD "Boiler House CapEx (USD)"

. 
. gen bh_ope_cost_USD = bh_ope_cost * 100000 / $USD2INR

. label var bh_ope_cost_USD "2018 Boiler House Operating Cost (USD)"

. 
. gen elecbill_2017_clean_USD = elecbill_2017_clean * 100000 / $USD2INR
(30 missing values generated)

. label var elecbill_2017_clean_USD "2017 Plant Total Electricity Cost (USD)"

. 
. ********************************************************************************
. ***************** [4] GENERATE "MAXIMAL" ABATEMENT TECHNOLOGY ******************
. ********************************************************************************
. 
. * Assuming cyclone < bag filter < scrubbers / esps
. gen cyc_max = (D_cyc == 1) & (D_bf == 0) & (D_scr == 0) & (D_esp == 0)

. gen bf_max = (D_bf == 1) & (D_scr == 0) & (D_esp == 0)

. gen scr_esp_max = (D_scr == 1) | (D_esp == 1)

. label var cyc_max "=1 if maximal abatement = cyclone"

. label var bf_max "=1 if maximal abatement = bag filter"

. label var scr_esp_max "=1 if maximal abatement = scrubbers / esps"

. 
. ********************************************************************************
. ***************************** [5] LABEL VARIABLES ******************************
. ********************************************************************************
. 
. label var ratio_rev_17to16 "= grossrev_17_18_clean / grossrev_16_17_clean"

. label var ratio_elec_17to16 "= elecbill_2017_clean / elecbill_2016_clean"

. label var pm_mass_etsbl "ETS Baseline Plant Total PM Mass Rate (kg/hr)"

. label var pm_conc_etsbl "ETS baseline plant mean PM concentration (mg/Nm{superscript:3})"

. label var pm_conc_cemsbl "CEMS Baseline Mean PM Concentration (mg/Nm{superscript:3})"

. label var mean_ring_premock "Mean pre-treatment Ringelmann score"

. 
. save "$BASELINE_DATA_OUT/BaselineCovariates.dta", replace
(file 02DataPipeline/baseline/BaselineCovariates.dta not found)
file 02DataPipeline/baseline/BaselineCovariates.dta saved

. 
end of do-file

. 
. * Construct analysis panels for each imputation rule
. do "$CODE_DIR/construct_analysis_panel.do" 0

. /*******************************************************************************
>            Authors: Dipika Gawande
>            Project: ETS
>            Purpose: Construct the analysis panel data set
> 
>            Date created: 25 November 2020
>            Version:      STATA 15 MP
> 
>            Last edited: 2 June 2022
>            Edited by:   Jeanne, Vineet, Kaixin
>    ****************************************************************************/
. 
. set more off

. clear matrix

. clear all

. pause on

. 
. local RuleNo "`1'"

. // local RuleNo "0"
. // local RuleNo "A"
. // local RuleNo "B"
. 
. ********************************************************************************
. ********** [1] MERGE DATA SETS TO CONSOLIDATE DEP VARS AND COVARIATES **********
. ********************************************************************************
. 
. ** MERGE IN THE DEPENDENT VARIABLE (PLANT-MONTH KG) FROM MEAN IMPUTATION RULE
. use "$IMPUTATION_DATA_OUT/PlantMonthPMMassRule`RuleNo'.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. 
. ** MERGE IN BASELINE COVARIATES
. sort industry_id

. ** 26/7034 unmatched coming from Baseline
. merge m:1 industry_id using "$BASELINE_DATA_OUT/BaselineCovariates.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                            26
        from master                         0  (_merge==1)
        from using                         26  (_merge==2)

    Matched                             7,008  (_merge==3)
    -----------------------------------------

. tab _m

   Matching result from |
                  merge |      Freq.     Percent        Cum.
------------------------+-----------------------------------
         Using only (2) |         26        0.37        0.37
            Matched (3) |      7,008       99.63      100.00
------------------------+-----------------------------------
                  Total |      7,034      100.00

. keep if _m == 3
(26 observations deleted)

. drop _m

. 
. ** RESTRICT THE SAMPLE TO START 16 APR 2019
. drop if month16 < date("2019apr16", "YMD")
(0 observations deleted)

. 
. if "`RuleNo'" != "M" {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 rename ind_month_mass_val_rule`i' Y_rule`i'
  3.                 label var Y_rule`i' "Plant Month Mass (kg) - trunc rule `i'"
  4.                 
.         }
. }

. else {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                         rename ind_month_mass_val_rule_`imprule'_`i' Y_rule_`imprule'_`i'
  4.                         label var Y_rule_`imprule'_`i' "Plant Month Mass (kg) - trunc rule `i'"
  5.                 
.                 }
  6.                 
.         }
.         
. }

. 
. 
. sort gpcb_id month16

. 
. ********************************************************************************
. ******************** [2] MAKE INTERREGNUM AND POST DUMMIES *********************
. ********************************************************************************
. 
. ** Generate interregnum dummy for period 16-Mar-2020 to 15-Oct-2020, 
. ** and month of 16-Nov-2020 (market was off for 2 weeks for Diwali in Nov 2020).
. gen D_interregnum = (month16 >= date("2020mar16", "YMD") & month16 <= date("2020sep16", "YMD")) | /// 
>         month16 == date("2020nov16", "YMD")

. label var D_interregnum "Interregnum"

. 
. ** Generate Mock 1: 16-Jul-2019 to 15-Sep-2019
. gen Mock1 = (month16 == date("2019jul16", "YMD") | month16 == date("2019aug16", "YMD") )

. label var Mock1 "Mock Trading 1 (pre-Covid)"

. 
. ** Generate Mock 2: 16-Oct-2020 to 15-Nov-2020
. gen Mock2 = month16 == date("2020oct16", "YMD")

. label var Mock2 "Mock Trading 2 (post-Covid)"   

. 
. ** Post1 is pre-interregnum only. 
. ** 16-Jul-2019 to 15-Mar-2020.
. gen post_mock1 = month16 >= date("2019jul16", "YMD") & month16 <= date("2020feb16", "YMD")

. label var post_mock1 "Post 1 (pre-Interregnum only)"

. 
. ** Post2 is post-interregnum only. 
. ** 16-Oct-2020 to 15-Nov-2020 & 16-Dec-2020 to 15-Feb-2021
. gen post_mock2 = month16 == date("2020oct16", "YMD") | month16 >= date("2020dec16", "YMD")

. label var post_mock2 "Post 2 (post-Interregnum only)"

. 
. tab month16 post_mock1

    Month, |
defined as |
   16th of |        Post 1
this month |   (pre-Interregnum
to 15th of |         only)
next month |         0          1 |     Total
-----------+----------------------+----------
 16-Apr-19 |       292          0 |       292 
 16-May-19 |       292          0 |       292 
 16-Jun-19 |       292          0 |       292 
 16-Jul-19 |         0        292 |       292 
 16-Aug-19 |         0        292 |       292 
 16-Sep-19 |         0        292 |       292 
 16-Oct-19 |         0        292 |       292 
 16-Nov-19 |         0        292 |       292 
 16-Dec-19 |         0        292 |       292 
 16-Jan-20 |         0        292 |       292 
 16-Feb-20 |         0        292 |       292 
 16-Mar-20 |       292          0 |       292 
 16-Apr-20 |       292          0 |       292 
 16-May-20 |       292          0 |       292 
 16-Jun-20 |       292          0 |       292 
 16-Jul-20 |       292          0 |       292 
 16-Aug-20 |       292          0 |       292 
 16-Sep-20 |       292          0 |       292 
 16-Oct-20 |       292          0 |       292 
 16-Nov-20 |       292          0 |       292 
 16-Dec-20 |       292          0 |       292 
 16-Jan-21 |       292          0 |       292 
 16-Feb-21 |       292          0 |       292 
 16-Mar-21 |       292          0 |       292 
-----------+----------------------+----------
     Total |     4,672      2,336 |     7,008 

. tab month16 post_mock2

    Month, |
defined as |
   16th of |        Post 2
this month |   (post-Interregnum
to 15th of |         only)
next month |         0          1 |     Total
-----------+----------------------+----------
 16-Apr-19 |       292          0 |       292 
 16-May-19 |       292          0 |       292 
 16-Jun-19 |       292          0 |       292 
 16-Jul-19 |       292          0 |       292 
 16-Aug-19 |       292          0 |       292 
 16-Sep-19 |       292          0 |       292 
 16-Oct-19 |       292          0 |       292 
 16-Nov-19 |       292          0 |       292 
 16-Dec-19 |       292          0 |       292 
 16-Jan-20 |       292          0 |       292 
 16-Feb-20 |       292          0 |       292 
 16-Mar-20 |       292          0 |       292 
 16-Apr-20 |       292          0 |       292 
 16-May-20 |       292          0 |       292 
 16-Jun-20 |       292          0 |       292 
 16-Jul-20 |       292          0 |       292 
 16-Aug-20 |       292          0 |       292 
 16-Sep-20 |       292          0 |       292 
 16-Oct-20 |         0        292 |       292 
 16-Nov-20 |       292          0 |       292 
 16-Dec-20 |         0        292 |       292 
 16-Jan-21 |         0        292 |       292 
 16-Feb-21 |         0        292 |       292 
 16-Mar-21 |         0        292 |       292 
-----------+----------------------+----------
     Total |     5,548      1,460 |     7,008 

. 
. ********************************************************************************
. ************************ [3] MAKE MONTH CAP & LOG VARS *************************
. ********************************************************************************
. 
. gen month_cap = 280000 if month16 >= td(16jul2019)
(876 missing values generated)

. replace month_cap = 200000 if month16 >= td(16oct2019)
(5,256 real changes made)

. replace month_cap = 180000 if month16 >= td(16nov2019)
(4,964 real changes made)

. replace month_cap = 170000 if month16 >= td(01jan2020)
(4,380 real changes made)

. label var month_cap "Month Cap (per Treatment Group)"

. 
. ** GENERATE LOG DEPENDENT VAR AND LOG COVARIATES
. 
. ** 10 rules: truncate at 99perc and 99.5perc at the monthly level for each of
. ** 5 sample restrictions (full, first 100, online by june, first 90, online by july)
. ** Code generating this: ETS/Data/ETS Analysis - 2020/2. Updated Version (June 2021)/2. Essential CEMS Working Data/0. Code/2b. 337 Stacks - Calibrated Stack-day Balanced STEM_v7.do
. if "`RuleNo'" != "M" {
.         
.         forvalues i=0(1)9{
  2.                 
.                 gen lnY_rule`i' = ln(Y_rule`i')
  3.                 label var lnY_rule`i' "Y=Ln(Plant Month PM Mass (kg) - trunc rule `i')"
  4.                 
.         }
(1,827 missing values generated)
(1,819 missing values generated)
(3,269 missing values generated)
(3,264 missing values generated)
(4,129 missing values generated)
(4,128 missing values generated)
(3,620 missing values generated)
(3,616 missing values generated)
(2,492 missing values generated)
(2,485 missing values generated)
. }

. else {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                         gen lnY_rule_`imprule'_`i' = ln(Y_rule_`imprule'_`i')
  4.                         label var lnY_rule_`imprule'_`i' "Y=Ln(Plant Month PM Mass (kg) - trunc rule `i')"
  5. 
.                 
.                 }
  6.                 
.         }
.         
. }

. 
. 
. 
. ********************************************************************************
. ********************** [4] CHECK DATA SET AND LABEL VARS ***********************
. ********************************************************************************
. 
. ** CHECKING DATA SET
. 
. ** Used gpcb_id instead of industry_id because it's numeric. 
. ** gpcb_id and industry_id are uniquely identified 1-to-1; use them interchangeably.
. duplicates r gpcb_id month16    

Duplicates in terms of gpcb_id month16

--------------------------------------
   Copies | Observations       Surplus
----------+---------------------------
        1 |         7008             0
--------------------------------------

. tab D_treatment treatmentstatus

1=Treatmen |     Official ETS
        t, |      Assignment
 0=Control |   Control  Treatment |     Total
-----------+----------------------+----------
         0 |     3,264          0 |     3,264 
         1 |         0      3,744 |     3,744 
-----------+----------------------+----------
     Total |     3,264      3,744 |     7,008 

. 
. ** LABELING VARS
. order industry_id, a(gpcb_id)

. order industry_name, a(industry_id)

. label var industry_id "Industry ID (str)"

. label var gpcb_id "GPCB ID (num)"

. label var D_treatment "ETS Treatment"

. cap: label var Y_rule0 "PM/Month"

. cap: label var Y_rule1 "PM/Month"

. cap: label var lnY_rule0 "log(PM/Month)"

. cap: label var lnY_rule1 "log(PM/Month)"

. 
. sort gpcb_id month16

. save "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", replace
(file 02DataPipeline/emissions/Rule0_Panel.dta not found)
file 02DataPipeline/emissions/Rule0_Panel.dta saved

. 
. ********************************************************************************
. ***************************** [5] CREATES WEIGHTS ******************************
. ********************************************************************************
. 
. if "`RuleNo'" == "0" {
. 
.         ** GENERATE CEMS PHASE INDICATOR
.         encode cems_phase, gen(cems_phase_factor)
.         gen CEMS_3_4 = (cems_phase_factor == 3 | cems_phase_factor == 4)
.         label var CEMS_3_4 "CEMS Phase 3 or 4"
. 
.         ** Foreach month create a reporting dummy
.         local levels "apr2019 jul2019 oct2019 jan2020"
.         foreach l of local levels {
  2.                 gen online_16`l' = (month16 == td("16`l'") & !missing(Y_rule0))
  3.                 bysort gpcb_id: egen online_16`l'_ind = max(online_16`l')
  4.         }
.         label var online_16apr2019_ind "Online Apr 2019"
.         label var online_16jul2019_ind "Online Jul 2019"
.         label var online_16oct2019_ind "Online Oct 2019"
.         label var online_16jan2020_ind "Online Jan 2020"
. 
.         ** Collapse at the plant level (292 observations)
.         keep gpcb_id industry_id D_treatment online_*_ind CEMS_3_4 
.         duplicates drop

Duplicates in terms of all variables

(6,716 observations deleted)
.         global cov_interest_weight = "CEMS_3_4" 
.         global months_subset "online_16jul2019_ind online_16oct2019_ind online_16jan2020_ind"
. 
.         foreach yvar of varlist $months_subset { 
  2. 
.                 tab `yvar'
  3. 
.                 * Compute probit
.                 eststo reg_`yvar': probit `yvar' $cov_interest_weight
  4.                 estadd local missingcov "Yes"
  5.                 estadd local model "Probit"
  6. 
.                 * predict
.                 predict `yvar'_hat
  7. 
.                 * construct weight
.                 qui sum `yvar'
  8.                 local S_unc = r(mean)
  9.                 gen newweight1_`yvar' = `S_unc' / `yvar'_hat 
 10. 
.                 * generate new var with coef
.                 gen coef_CEMS_`yvar' = _b[CEMS_3_4]
 11. 
.         }

 Online Jul |
       2019 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         91       31.16       31.16
          1 |        201       68.84      100.00
------------+-----------------------------------
      Total |        292      100.00

Iteration 0:  Log likelihood = -181.15961  
Iteration 1:  Log likelihood = -157.40844  
Iteration 2:  Log likelihood = -157.14843  
Iteration 3:  Log likelihood =  -157.1484  
Iteration 4:  Log likelihood =  -157.1484  

Probit regression                                       Number of obs =    292
                                                        LR chi2(1)    =  48.02
                                                        Prob > chi2   = 0.0000
Log likelihood = -157.1484                              Pseudo R2     = 0.1325

--------------------------------------------------------------------------------------
online_16jul2019_ind | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
---------------------+----------------------------------------------------------------
            CEMS_3_4 |  -1.190849   .1829781    -6.51   0.000     -1.54948   -.8322186
               _cons |   1.286275    .155771     8.26   0.000     .9809695    1.591581
--------------------------------------------------------------------------------------

added macro:
         e(missingcov) : "Yes"

added macro:
              e(model) : "Probit"
(option pr assumed; Pr(online_16jul2019_ind))

 Online Oct |
       2019 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         49       16.78       16.78
          1 |        243       83.22      100.00
------------+-----------------------------------
      Total |        292      100.00

Iteration 0:  Log likelihood = -132.09898  
Iteration 1:  Log likelihood = -130.02378  
Iteration 2:  Log likelihood = -130.01739  
Iteration 3:  Log likelihood = -130.01739  

Probit regression                                       Number of obs =    292
                                                        LR chi2(1)    =   4.16
                                                        Prob > chi2   = 0.0413
Log likelihood = -130.01739                             Pseudo R2     = 0.0158

--------------------------------------------------------------------------------------
online_16oct2019_ind | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
---------------------+----------------------------------------------------------------
            CEMS_3_4 |  -.3717214   .1845658    -2.01   0.044    -.7334637    -.009979
               _cons |   1.196748   .1491651     8.02   0.000     .9043894    1.489106
--------------------------------------------------------------------------------------

added macro:
         e(missingcov) : "Yes"

added macro:
              e(model) : "Probit"
(option pr assumed; Pr(online_16oct2019_ind))

 Online Jan |
       2020 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         32       10.96       10.96
          1 |        260       89.04      100.00
------------+-----------------------------------
      Total |        292      100.00

Iteration 0:  Log likelihood = -100.93134  
Iteration 1:  Log likelihood = -100.14238  
Iteration 2:  Log likelihood = -100.14049  
Iteration 3:  Log likelihood = -100.14049  

Probit regression                                       Number of obs =    292
                                                        LR chi2(1)    =   1.58
                                                        Prob > chi2   = 0.2085
Log likelihood = -100.14049                             Pseudo R2     = 0.0078

--------------------------------------------------------------------------------------
online_16jan2020_ind | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
---------------------+----------------------------------------------------------------
            CEMS_3_4 |  -.2547281   .2045819    -1.25   0.213    -.6557012    .1462449
               _cons |     1.3875   .1642918     8.45   0.000     1.065494    1.709506
--------------------------------------------------------------------------------------

added macro:
         e(missingcov) : "Yes"

added macro:
              e(model) : "Probit"
(option pr assumed; Pr(online_16jan2020_ind))
. 
.         keep gpcb_id *_hat newweight1_*
.         tempfile weights_file
.         save `weights_file'
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000001 saved as .dta format
. 
.         ** MERGE TO FULL DATA
.         use "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)
.         merge m:1 gpcb_id using `weights_file'

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             7,008  (_merge==3)
    -----------------------------------------
.         gen newweight = newweight1_online_16oct2019
.         replace newweight = newweight1_online_16jul2019 if month16 <= date("October 1 2019","MDY")
(1,752 real changes made)
.         replace newweight = newweight1_online_16jan2020 if month16 >= date("January 1 2020","MDY")
(4,380 real changes made)
.         bysort month16: egen sum_newweight = sum(newweight)
.         gen newweight_normalized = newweight / sum_newweight
.         bysort month16: egen sum_newweight_nom = sum(newweight_normalized)
.         assert sum_newweight_nom == 1
.         drop _merge sum_newweight sum_newweight_nom
.         sort gpcb_id month16
. 
.         save "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", replace
file 02DataPipeline/emissions/Rule0_Panel.dta saved
. 
. }

. 
end of do-file

. do "$CODE_DIR/construct_analysis_panel.do" A

. /*******************************************************************************
>            Authors: Dipika Gawande
>            Project: ETS
>            Purpose: Construct the analysis panel data set
> 
>            Date created: 25 November 2020
>            Version:      STATA 15 MP
> 
>            Last edited: 2 June 2022
>            Edited by:   Jeanne, Vineet, Kaixin
>    ****************************************************************************/
. 
. set more off

. clear matrix

. clear all

. pause on

. 
. local RuleNo "`1'"

. // local RuleNo "0"
. // local RuleNo "A"
. // local RuleNo "B"
. 
. ********************************************************************************
. ********** [1] MERGE DATA SETS TO CONSOLIDATE DEP VARS AND COVARIATES **********
. ********************************************************************************
. 
. ** MERGE IN THE DEPENDENT VARIABLE (PLANT-MONTH KG) FROM MEAN IMPUTATION RULE
. use "$IMPUTATION_DATA_OUT/PlantMonthPMMassRule`RuleNo'.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. 
. ** MERGE IN BASELINE COVARIATES
. sort industry_id

. ** 26/7034 unmatched coming from Baseline
. merge m:1 industry_id using "$BASELINE_DATA_OUT/BaselineCovariates.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                            26
        from master                         0  (_merge==1)
        from using                         26  (_merge==2)

    Matched                             7,008  (_merge==3)
    -----------------------------------------

. tab _m

   Matching result from |
                  merge |      Freq.     Percent        Cum.
------------------------+-----------------------------------
         Using only (2) |         26        0.37        0.37
            Matched (3) |      7,008       99.63      100.00
------------------------+-----------------------------------
                  Total |      7,034      100.00

. keep if _m == 3
(26 observations deleted)

. drop _m

. 
. ** RESTRICT THE SAMPLE TO START 16 APR 2019
. drop if month16 < date("2019apr16", "YMD")
(0 observations deleted)

. 
. if "`RuleNo'" != "M" {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 rename ind_month_mass_val_rule`i' Y_rule`i'
  3.                 label var Y_rule`i' "Plant Month Mass (kg) - trunc rule `i'"
  4.                 
.         }
. }

. else {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                         rename ind_month_mass_val_rule_`imprule'_`i' Y_rule_`imprule'_`i'
  4.                         label var Y_rule_`imprule'_`i' "Plant Month Mass (kg) - trunc rule `i'"
  5.                 
.                 }
  6.                 
.         }
.         
. }

. 
. 
. sort gpcb_id month16

. 
. ********************************************************************************
. ******************** [2] MAKE INTERREGNUM AND POST DUMMIES *********************
. ********************************************************************************
. 
. ** Generate interregnum dummy for period 16-Mar-2020 to 15-Oct-2020, 
. ** and month of 16-Nov-2020 (market was off for 2 weeks for Diwali in Nov 2020).
. gen D_interregnum = (month16 >= date("2020mar16", "YMD") & month16 <= date("2020sep16", "YMD")) | /// 
>         month16 == date("2020nov16", "YMD")

. label var D_interregnum "Interregnum"

. 
. ** Generate Mock 1: 16-Jul-2019 to 15-Sep-2019
. gen Mock1 = (month16 == date("2019jul16", "YMD") | month16 == date("2019aug16", "YMD") )

. label var Mock1 "Mock Trading 1 (pre-Covid)"

. 
. ** Generate Mock 2: 16-Oct-2020 to 15-Nov-2020
. gen Mock2 = month16 == date("2020oct16", "YMD")

. label var Mock2 "Mock Trading 2 (post-Covid)"   

. 
. ** Post1 is pre-interregnum only. 
. ** 16-Jul-2019 to 15-Mar-2020.
. gen post_mock1 = month16 >= date("2019jul16", "YMD") & month16 <= date("2020feb16", "YMD")

. label var post_mock1 "Post 1 (pre-Interregnum only)"

. 
. ** Post2 is post-interregnum only. 
. ** 16-Oct-2020 to 15-Nov-2020 & 16-Dec-2020 to 15-Feb-2021
. gen post_mock2 = month16 == date("2020oct16", "YMD") | month16 >= date("2020dec16", "YMD")

. label var post_mock2 "Post 2 (post-Interregnum only)"

. 
. tab month16 post_mock1

    Month, |
defined as |
   16th of |        Post 1
this month |   (pre-Interregnum
to 15th of |         only)
next month |         0          1 |     Total
-----------+----------------------+----------
 16-Apr-19 |       292          0 |       292 
 16-May-19 |       292          0 |       292 
 16-Jun-19 |       292          0 |       292 
 16-Jul-19 |         0        292 |       292 
 16-Aug-19 |         0        292 |       292 
 16-Sep-19 |         0        292 |       292 
 16-Oct-19 |         0        292 |       292 
 16-Nov-19 |         0        292 |       292 
 16-Dec-19 |         0        292 |       292 
 16-Jan-20 |         0        292 |       292 
 16-Feb-20 |         0        292 |       292 
 16-Mar-20 |       292          0 |       292 
 16-Apr-20 |       292          0 |       292 
 16-May-20 |       292          0 |       292 
 16-Jun-20 |       292          0 |       292 
 16-Jul-20 |       292          0 |       292 
 16-Aug-20 |       292          0 |       292 
 16-Sep-20 |       292          0 |       292 
 16-Oct-20 |       292          0 |       292 
 16-Nov-20 |       292          0 |       292 
 16-Dec-20 |       292          0 |       292 
 16-Jan-21 |       292          0 |       292 
 16-Feb-21 |       292          0 |       292 
 16-Mar-21 |       292          0 |       292 
-----------+----------------------+----------
     Total |     4,672      2,336 |     7,008 

. tab month16 post_mock2

    Month, |
defined as |
   16th of |        Post 2
this month |   (post-Interregnum
to 15th of |         only)
next month |         0          1 |     Total
-----------+----------------------+----------
 16-Apr-19 |       292          0 |       292 
 16-May-19 |       292          0 |       292 
 16-Jun-19 |       292          0 |       292 
 16-Jul-19 |       292          0 |       292 
 16-Aug-19 |       292          0 |       292 
 16-Sep-19 |       292          0 |       292 
 16-Oct-19 |       292          0 |       292 
 16-Nov-19 |       292          0 |       292 
 16-Dec-19 |       292          0 |       292 
 16-Jan-20 |       292          0 |       292 
 16-Feb-20 |       292          0 |       292 
 16-Mar-20 |       292          0 |       292 
 16-Apr-20 |       292          0 |       292 
 16-May-20 |       292          0 |       292 
 16-Jun-20 |       292          0 |       292 
 16-Jul-20 |       292          0 |       292 
 16-Aug-20 |       292          0 |       292 
 16-Sep-20 |       292          0 |       292 
 16-Oct-20 |         0        292 |       292 
 16-Nov-20 |       292          0 |       292 
 16-Dec-20 |         0        292 |       292 
 16-Jan-21 |         0        292 |       292 
 16-Feb-21 |         0        292 |       292 
 16-Mar-21 |         0        292 |       292 
-----------+----------------------+----------
     Total |     5,548      1,460 |     7,008 

. 
. ********************************************************************************
. ************************ [3] MAKE MONTH CAP & LOG VARS *************************
. ********************************************************************************
. 
. gen month_cap = 280000 if month16 >= td(16jul2019)
(876 missing values generated)

. replace month_cap = 200000 if month16 >= td(16oct2019)
(5,256 real changes made)

. replace month_cap = 180000 if month16 >= td(16nov2019)
(4,964 real changes made)

. replace month_cap = 170000 if month16 >= td(01jan2020)
(4,380 real changes made)

. label var month_cap "Month Cap (per Treatment Group)"

. 
. ** GENERATE LOG DEPENDENT VAR AND LOG COVARIATES
. 
. ** 10 rules: truncate at 99perc and 99.5perc at the monthly level for each of
. ** 5 sample restrictions (full, first 100, online by june, first 90, online by july)
. ** Code generating this: ETS/Data/ETS Analysis - 2020/2. Updated Version (June 2021)/2. Essential CEMS Working Data/0. Code/2b. 337 Stacks - Calibrated Stack-day Balanced STEM_v7.do
. if "`RuleNo'" != "M" {
.         
.         forvalues i=0(1)9{
  2.                 
.                 gen lnY_rule`i' = ln(Y_rule`i')
  3.                 label var lnY_rule`i' "Y=Ln(Plant Month PM Mass (kg) - trunc rule `i')"
  4.                 
.         }
(2,121 missing values generated)
(2,109 missing values generated)
(3,597 missing values generated)
(3,588 missing values generated)
(4,386 missing values generated)
(4,381 missing values generated)
(3,923 missing values generated)
(3,914 missing values generated)
(2,915 missing values generated)
(2,904 missing values generated)
. }

. else {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                         gen lnY_rule_`imprule'_`i' = ln(Y_rule_`imprule'_`i')
  4.                         label var lnY_rule_`imprule'_`i' "Y=Ln(Plant Month PM Mass (kg) - trunc rule `i')"
  5. 
.                 
.                 }
  6.                 
.         }
.         
. }

. 
. 
. 
. ********************************************************************************
. ********************** [4] CHECK DATA SET AND LABEL VARS ***********************
. ********************************************************************************
. 
. ** CHECKING DATA SET
. 
. ** Used gpcb_id instead of industry_id because it's numeric. 
. ** gpcb_id and industry_id are uniquely identified 1-to-1; use them interchangeably.
. duplicates r gpcb_id month16    

Duplicates in terms of gpcb_id month16

--------------------------------------
   Copies | Observations       Surplus
----------+---------------------------
        1 |         7008             0
--------------------------------------

. tab D_treatment treatmentstatus

1=Treatmen |     Official ETS
        t, |      Assignment
 0=Control |   Control  Treatment |     Total
-----------+----------------------+----------
         0 |     3,264          0 |     3,264 
         1 |         0      3,744 |     3,744 
-----------+----------------------+----------
     Total |     3,264      3,744 |     7,008 

. 
. ** LABELING VARS
. order industry_id, a(gpcb_id)

. order industry_name, a(industry_id)

. label var industry_id "Industry ID (str)"

. label var gpcb_id "GPCB ID (num)"

. label var D_treatment "ETS Treatment"

. cap: label var Y_rule0 "PM/Month"

. cap: label var Y_rule1 "PM/Month"

. cap: label var lnY_rule0 "log(PM/Month)"

. cap: label var lnY_rule1 "log(PM/Month)"

. 
. sort gpcb_id month16

. save "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", replace
(file 02DataPipeline/emissions/RuleA_Panel.dta not found)
file 02DataPipeline/emissions/RuleA_Panel.dta saved

. 
. ********************************************************************************
. ***************************** [5] CREATES WEIGHTS ******************************
. ********************************************************************************
. 
. if "`RuleNo'" == "0" {
. 
.         ** GENERATE CEMS PHASE INDICATOR
.         encode cems_phase, gen(cems_phase_factor)
.         gen CEMS_3_4 = (cems_phase_factor == 3 | cems_phase_factor == 4)
.         label var CEMS_3_4 "CEMS Phase 3 or 4"
. 
.         ** Foreach month create a reporting dummy
.         local levels "apr2019 jul2019 oct2019 jan2020"
.         foreach l of local levels {
  2.                 gen online_16`l' = (month16 == td("16`l'") & !missing(Y_rule0))
  3.                 bysort gpcb_id: egen online_16`l'_ind = max(online_16`l')
  4.         }
.         label var online_16apr2019_ind "Online Apr 2019"
.         label var online_16jul2019_ind "Online Jul 2019"
.         label var online_16oct2019_ind "Online Oct 2019"
.         label var online_16jan2020_ind "Online Jan 2020"
. 
.         ** Collapse at the plant level (292 observations)
.         keep gpcb_id industry_id D_treatment online_*_ind CEMS_3_4 
.         duplicates drop
.         global cov_interest_weight = "CEMS_3_4" 
.         global months_subset "online_16jul2019_ind online_16oct2019_ind online_16jan2020_ind"
. 
.         foreach yvar of varlist $months_subset { 
  2. 
.                 tab `yvar'
  3. 
.                 * Compute probit
.                 eststo reg_`yvar': probit `yvar' $cov_interest_weight
  4.                 estadd local missingcov "Yes"
  5.                 estadd local model "Probit"
  6. 
.                 * predict
.                 predict `yvar'_hat
  7. 
.                 * construct weight
.                 qui sum `yvar'
  8.                 local S_unc = r(mean)
  9.                 gen newweight1_`yvar' = `S_unc' / `yvar'_hat 
 10. 
.                 * generate new var with coef
.                 gen coef_CEMS_`yvar' = _b[CEMS_3_4]
 11. 
.         }
. 
.         keep gpcb_id *_hat newweight1_*
.         tempfile weights_file
.         save `weights_file'
. 
.         ** MERGE TO FULL DATA
.         use "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", clear
.         merge m:1 gpcb_id using `weights_file'
.         gen newweight = newweight1_online_16oct2019
.         replace newweight = newweight1_online_16jul2019 if month16 <= date("October 1 2019","MDY")
.         replace newweight = newweight1_online_16jan2020 if month16 >= date("January 1 2020","MDY")
.         bysort month16: egen sum_newweight = sum(newweight)
.         gen newweight_normalized = newweight / sum_newweight
.         bysort month16: egen sum_newweight_nom = sum(newweight_normalized)
.         assert sum_newweight_nom == 1
.         drop _merge sum_newweight sum_newweight_nom
.         sort gpcb_id month16
. 
.         save "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", replace
. 
. }

. 
end of do-file

. do "$CODE_DIR/construct_analysis_panel.do" B

. /*******************************************************************************
>            Authors: Dipika Gawande
>            Project: ETS
>            Purpose: Construct the analysis panel data set
> 
>            Date created: 25 November 2020
>            Version:      STATA 15 MP
> 
>            Last edited: 2 June 2022
>            Edited by:   Jeanne, Vineet, Kaixin
>    ****************************************************************************/
. 
. set more off

. clear matrix

. clear all

. pause on

. 
. local RuleNo "`1'"

. // local RuleNo "0"
. // local RuleNo "A"
. // local RuleNo "B"
. 
. ********************************************************************************
. ********** [1] MERGE DATA SETS TO CONSOLIDATE DEP VARS AND COVARIATES **********
. ********************************************************************************
. 
. ** MERGE IN THE DEPENDENT VARIABLE (PLANT-MONTH KG) FROM MEAN IMPUTATION RULE
. use "$IMPUTATION_DATA_OUT/PlantMonthPMMassRule`RuleNo'.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. 
. ** MERGE IN BASELINE COVARIATES
. sort industry_id

. ** 26/7034 unmatched coming from Baseline
. merge m:1 industry_id using "$BASELINE_DATA_OUT/BaselineCovariates.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                            26
        from master                         0  (_merge==1)
        from using                         26  (_merge==2)

    Matched                             7,008  (_merge==3)
    -----------------------------------------

. tab _m

   Matching result from |
                  merge |      Freq.     Percent        Cum.
------------------------+-----------------------------------
         Using only (2) |         26        0.37        0.37
            Matched (3) |      7,008       99.63      100.00
------------------------+-----------------------------------
                  Total |      7,034      100.00

. keep if _m == 3
(26 observations deleted)

. drop _m

. 
. ** RESTRICT THE SAMPLE TO START 16 APR 2019
. drop if month16 < date("2019apr16", "YMD")
(0 observations deleted)

. 
. if "`RuleNo'" != "M" {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 rename ind_month_mass_val_rule`i' Y_rule`i'
  3.                 label var Y_rule`i' "Plant Month Mass (kg) - trunc rule `i'"
  4.                 
.         }
. }

. else {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                         rename ind_month_mass_val_rule_`imprule'_`i' Y_rule_`imprule'_`i'
  4.                         label var Y_rule_`imprule'_`i' "Plant Month Mass (kg) - trunc rule `i'"
  5.                 
.                 }
  6.                 
.         }
.         
. }

. 
. 
. sort gpcb_id month16

. 
. ********************************************************************************
. ******************** [2] MAKE INTERREGNUM AND POST DUMMIES *********************
. ********************************************************************************
. 
. ** Generate interregnum dummy for period 16-Mar-2020 to 15-Oct-2020, 
. ** and month of 16-Nov-2020 (market was off for 2 weeks for Diwali in Nov 2020).
. gen D_interregnum = (month16 >= date("2020mar16", "YMD") & month16 <= date("2020sep16", "YMD")) | /// 
>         month16 == date("2020nov16", "YMD")

. label var D_interregnum "Interregnum"

. 
. ** Generate Mock 1: 16-Jul-2019 to 15-Sep-2019
. gen Mock1 = (month16 == date("2019jul16", "YMD") | month16 == date("2019aug16", "YMD") )

. label var Mock1 "Mock Trading 1 (pre-Covid)"

. 
. ** Generate Mock 2: 16-Oct-2020 to 15-Nov-2020
. gen Mock2 = month16 == date("2020oct16", "YMD")

. label var Mock2 "Mock Trading 2 (post-Covid)"   

. 
. ** Post1 is pre-interregnum only. 
. ** 16-Jul-2019 to 15-Mar-2020.
. gen post_mock1 = month16 >= date("2019jul16", "YMD") & month16 <= date("2020feb16", "YMD")

. label var post_mock1 "Post 1 (pre-Interregnum only)"

. 
. ** Post2 is post-interregnum only. 
. ** 16-Oct-2020 to 15-Nov-2020 & 16-Dec-2020 to 15-Feb-2021
. gen post_mock2 = month16 == date("2020oct16", "YMD") | month16 >= date("2020dec16", "YMD")

. label var post_mock2 "Post 2 (post-Interregnum only)"

. 
. tab month16 post_mock1

    Month, |
defined as |
   16th of |        Post 1
this month |   (pre-Interregnum
to 15th of |         only)
next month |         0          1 |     Total
-----------+----------------------+----------
 16-Apr-19 |       292          0 |       292 
 16-May-19 |       292          0 |       292 
 16-Jun-19 |       292          0 |       292 
 16-Jul-19 |         0        292 |       292 
 16-Aug-19 |         0        292 |       292 
 16-Sep-19 |         0        292 |       292 
 16-Oct-19 |         0        292 |       292 
 16-Nov-19 |         0        292 |       292 
 16-Dec-19 |         0        292 |       292 
 16-Jan-20 |         0        292 |       292 
 16-Feb-20 |         0        292 |       292 
 16-Mar-20 |       292          0 |       292 
 16-Apr-20 |       292          0 |       292 
 16-May-20 |       292          0 |       292 
 16-Jun-20 |       292          0 |       292 
 16-Jul-20 |       292          0 |       292 
 16-Aug-20 |       292          0 |       292 
 16-Sep-20 |       292          0 |       292 
 16-Oct-20 |       292          0 |       292 
 16-Nov-20 |       292          0 |       292 
 16-Dec-20 |       292          0 |       292 
 16-Jan-21 |       292          0 |       292 
 16-Feb-21 |       292          0 |       292 
 16-Mar-21 |       292          0 |       292 
-----------+----------------------+----------
     Total |     4,672      2,336 |     7,008 

. tab month16 post_mock2

    Month, |
defined as |
   16th of |        Post 2
this month |   (post-Interregnum
to 15th of |         only)
next month |         0          1 |     Total
-----------+----------------------+----------
 16-Apr-19 |       292          0 |       292 
 16-May-19 |       292          0 |       292 
 16-Jun-19 |       292          0 |       292 
 16-Jul-19 |       292          0 |       292 
 16-Aug-19 |       292          0 |       292 
 16-Sep-19 |       292          0 |       292 
 16-Oct-19 |       292          0 |       292 
 16-Nov-19 |       292          0 |       292 
 16-Dec-19 |       292          0 |       292 
 16-Jan-20 |       292          0 |       292 
 16-Feb-20 |       292          0 |       292 
 16-Mar-20 |       292          0 |       292 
 16-Apr-20 |       292          0 |       292 
 16-May-20 |       292          0 |       292 
 16-Jun-20 |       292          0 |       292 
 16-Jul-20 |       292          0 |       292 
 16-Aug-20 |       292          0 |       292 
 16-Sep-20 |       292          0 |       292 
 16-Oct-20 |         0        292 |       292 
 16-Nov-20 |       292          0 |       292 
 16-Dec-20 |         0        292 |       292 
 16-Jan-21 |         0        292 |       292 
 16-Feb-21 |         0        292 |       292 
 16-Mar-21 |         0        292 |       292 
-----------+----------------------+----------
     Total |     5,548      1,460 |     7,008 

. 
. ********************************************************************************
. ************************ [3] MAKE MONTH CAP & LOG VARS *************************
. ********************************************************************************
. 
. gen month_cap = 280000 if month16 >= td(16jul2019)
(876 missing values generated)

. replace month_cap = 200000 if month16 >= td(16oct2019)
(5,256 real changes made)

. replace month_cap = 180000 if month16 >= td(16nov2019)
(4,964 real changes made)

. replace month_cap = 170000 if month16 >= td(01jan2020)
(4,380 real changes made)

. label var month_cap "Month Cap (per Treatment Group)"

. 
. ** GENERATE LOG DEPENDENT VAR AND LOG COVARIATES
. 
. ** 10 rules: truncate at 99perc and 99.5perc at the monthly level for each of
. ** 5 sample restrictions (full, first 100, online by june, first 90, online by july)
. ** Code generating this: ETS/Data/ETS Analysis - 2020/2. Updated Version (June 2021)/2. Essential CEMS Working Data/0. Code/2b. 337 Stacks - Calibrated Stack-day Balanced STEM_v7.do
. if "`RuleNo'" != "M" {
.         
.         forvalues i=0(1)9{
  2.                 
.                 gen lnY_rule`i' = ln(Y_rule`i')
  3.                 label var lnY_rule`i' "Y=Ln(Plant Month PM Mass (kg) - trunc rule `i')"
  4.                 
.         }
. }

. else {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                         gen lnY_rule_`imprule'_`i' = ln(Y_rule_`imprule'_`i')
  4.                         label var lnY_rule_`imprule'_`i' "Y=Ln(Plant Month PM Mass (kg) - trunc rule `i')"
  5. 
.                 
.                 }
  6.                 
.         }
.         
. }

. 
. 
. 
. ********************************************************************************
. ********************** [4] CHECK DATA SET AND LABEL VARS ***********************
. ********************************************************************************
. 
. ** CHECKING DATA SET
. 
. ** Used gpcb_id instead of industry_id because it's numeric. 
. ** gpcb_id and industry_id are uniquely identified 1-to-1; use them interchangeably.
. duplicates r gpcb_id month16    

Duplicates in terms of gpcb_id month16

--------------------------------------
   Copies | Observations       Surplus
----------+---------------------------
        1 |         7008             0
--------------------------------------

. tab D_treatment treatmentstatus

1=Treatmen |     Official ETS
        t, |      Assignment
 0=Control |   Control  Treatment |     Total
-----------+----------------------+----------
         0 |     3,264          0 |     3,264 
         1 |         0      3,744 |     3,744 
-----------+----------------------+----------
     Total |     3,264      3,744 |     7,008 

. 
. ** LABELING VARS
. order industry_id, a(gpcb_id)

. order industry_name, a(industry_id)

. label var industry_id "Industry ID (str)"

. label var gpcb_id "GPCB ID (num)"

. label var D_treatment "ETS Treatment"

. cap: label var Y_rule0 "PM/Month"

. cap: label var Y_rule1 "PM/Month"

. cap: label var lnY_rule0 "log(PM/Month)"

. cap: label var lnY_rule1 "log(PM/Month)"

. 
. sort gpcb_id month16

. save "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", replace
(file 02DataPipeline/emissions/RuleB_Panel.dta not found)
file 02DataPipeline/emissions/RuleB_Panel.dta saved

. 
. ********************************************************************************
. ***************************** [5] CREATES WEIGHTS ******************************
. ********************************************************************************
. 
. if "`RuleNo'" == "0" {
. 
.         ** GENERATE CEMS PHASE INDICATOR
.         encode cems_phase, gen(cems_phase_factor)
.         gen CEMS_3_4 = (cems_phase_factor == 3 | cems_phase_factor == 4)
.         label var CEMS_3_4 "CEMS Phase 3 or 4"
. 
.         ** Foreach month create a reporting dummy
.         local levels "apr2019 jul2019 oct2019 jan2020"
.         foreach l of local levels {
  2.                 gen online_16`l' = (month16 == td("16`l'") & !missing(Y_rule0))
  3.                 bysort gpcb_id: egen online_16`l'_ind = max(online_16`l')
  4.         }
.         label var online_16apr2019_ind "Online Apr 2019"
.         label var online_16jul2019_ind "Online Jul 2019"
.         label var online_16oct2019_ind "Online Oct 2019"
.         label var online_16jan2020_ind "Online Jan 2020"
. 
.         ** Collapse at the plant level (292 observations)
.         keep gpcb_id industry_id D_treatment online_*_ind CEMS_3_4 
.         duplicates drop
.         global cov_interest_weight = "CEMS_3_4" 
.         global months_subset "online_16jul2019_ind online_16oct2019_ind online_16jan2020_ind"
. 
.         foreach yvar of varlist $months_subset { 
  2. 
.                 tab `yvar'
  3. 
.                 * Compute probit
.                 eststo reg_`yvar': probit `yvar' $cov_interest_weight
  4.                 estadd local missingcov "Yes"
  5.                 estadd local model "Probit"
  6. 
.                 * predict
.                 predict `yvar'_hat
  7. 
.                 * construct weight
.                 qui sum `yvar'
  8.                 local S_unc = r(mean)
  9.                 gen newweight1_`yvar' = `S_unc' / `yvar'_hat 
 10. 
.                 * generate new var with coef
.                 gen coef_CEMS_`yvar' = _b[CEMS_3_4]
 11. 
.         }
. 
.         keep gpcb_id *_hat newweight1_*
.         tempfile weights_file
.         save `weights_file'
. 
.         ** MERGE TO FULL DATA
.         use "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", clear
.         merge m:1 gpcb_id using `weights_file'
.         gen newweight = newweight1_online_16oct2019
.         replace newweight = newweight1_online_16jul2019 if month16 <= date("October 1 2019","MDY")
.         replace newweight = newweight1_online_16jan2020 if month16 >= date("January 1 2020","MDY")
.         bysort month16: egen sum_newweight = sum(newweight)
.         gen newweight_normalized = newweight / sum_newweight
.         bysort month16: egen sum_newweight_nom = sum(newweight_normalized)
.         assert sum_newweight_nom == 1
.         drop _merge sum_newweight sum_newweight_nom
.         sort gpcb_id month16
. 
.         save "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", replace
. 
. }

. 
end of do-file

. do "$CODE_DIR/construct_analysis_panel.do" M

. /*******************************************************************************
>            Authors: Dipika Gawande
>            Project: ETS
>            Purpose: Construct the analysis panel data set
> 
>            Date created: 25 November 2020
>            Version:      STATA 15 MP
> 
>            Last edited: 2 June 2022
>            Edited by:   Jeanne, Vineet, Kaixin
>    ****************************************************************************/
. 
. set more off

. clear matrix

. clear all

. pause on

. 
. local RuleNo "`1'"

. // local RuleNo "0"
. // local RuleNo "A"
. // local RuleNo "B"
. 
. ********************************************************************************
. ********** [1] MERGE DATA SETS TO CONSOLIDATE DEP VARS AND COVARIATES **********
. ********************************************************************************
. 
. ** MERGE IN THE DEPENDENT VARIABLE (PLANT-MONTH KG) FROM MEAN IMPUTATION RULE
. use "$IMPUTATION_DATA_OUT/PlantMonthPMMassRule`RuleNo'.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. 
. ** MERGE IN BASELINE COVARIATES
. sort industry_id

. ** 26/7034 unmatched coming from Baseline
. merge m:1 industry_id using "$BASELINE_DATA_OUT/BaselineCovariates.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                            26
        from master                         0  (_merge==1)
        from using                         26  (_merge==2)

    Matched                             7,008  (_merge==3)
    -----------------------------------------

. tab _m

   Matching result from |
                  merge |      Freq.     Percent        Cum.
------------------------+-----------------------------------
         Using only (2) |         26        0.37        0.37
            Matched (3) |      7,008       99.63      100.00
------------------------+-----------------------------------
                  Total |      7,034      100.00

. keep if _m == 3
(26 observations deleted)

. drop _m

. 
. ** RESTRICT THE SAMPLE TO START 16 APR 2019
. drop if month16 < date("2019apr16", "YMD")
(0 observations deleted)

. 
. if "`RuleNo'" != "M" {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 rename ind_month_mass_val_rule`i' Y_rule`i'
  3.                 label var Y_rule`i' "Plant Month Mass (kg) - trunc rule `i'"
  4.                 
.         }
. }

. else {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                         rename ind_month_mass_val_rule_`imprule'_`i' Y_rule_`imprule'_`i'
  4.                         label var Y_rule_`imprule'_`i' "Plant Month Mass (kg) - trunc rule `i'"
  5.                 
.                 }
  6.                 
.         }
.         
. }

. 
. 
. sort gpcb_id month16

. 
. ********************************************************************************
. ******************** [2] MAKE INTERREGNUM AND POST DUMMIES *********************
. ********************************************************************************
. 
. ** Generate interregnum dummy for period 16-Mar-2020 to 15-Oct-2020, 
. ** and month of 16-Nov-2020 (market was off for 2 weeks for Diwali in Nov 2020).
. gen D_interregnum = (month16 >= date("2020mar16", "YMD") & month16 <= date("2020sep16", "YMD")) | /// 
>         month16 == date("2020nov16", "YMD")

. label var D_interregnum "Interregnum"

. 
. ** Generate Mock 1: 16-Jul-2019 to 15-Sep-2019
. gen Mock1 = (month16 == date("2019jul16", "YMD") | month16 == date("2019aug16", "YMD") )

. label var Mock1 "Mock Trading 1 (pre-Covid)"

. 
. ** Generate Mock 2: 16-Oct-2020 to 15-Nov-2020
. gen Mock2 = month16 == date("2020oct16", "YMD")

. label var Mock2 "Mock Trading 2 (post-Covid)"   

. 
. ** Post1 is pre-interregnum only. 
. ** 16-Jul-2019 to 15-Mar-2020.
. gen post_mock1 = month16 >= date("2019jul16", "YMD") & month16 <= date("2020feb16", "YMD")

. label var post_mock1 "Post 1 (pre-Interregnum only)"

. 
. ** Post2 is post-interregnum only. 
. ** 16-Oct-2020 to 15-Nov-2020 & 16-Dec-2020 to 15-Feb-2021
. gen post_mock2 = month16 == date("2020oct16", "YMD") | month16 >= date("2020dec16", "YMD")

. label var post_mock2 "Post 2 (post-Interregnum only)"

. 
. tab month16 post_mock1

    Month, |
defined as |
   16th of |        Post 1
this month |   (pre-Interregnum
to 15th of |         only)
next month |         0          1 |     Total
-----------+----------------------+----------
 16-Apr-19 |       292          0 |       292 
 16-May-19 |       292          0 |       292 
 16-Jun-19 |       292          0 |       292 
 16-Jul-19 |         0        292 |       292 
 16-Aug-19 |         0        292 |       292 
 16-Sep-19 |         0        292 |       292 
 16-Oct-19 |         0        292 |       292 
 16-Nov-19 |         0        292 |       292 
 16-Dec-19 |         0        292 |       292 
 16-Jan-20 |         0        292 |       292 
 16-Feb-20 |         0        292 |       292 
 16-Mar-20 |       292          0 |       292 
 16-Apr-20 |       292          0 |       292 
 16-May-20 |       292          0 |       292 
 16-Jun-20 |       292          0 |       292 
 16-Jul-20 |       292          0 |       292 
 16-Aug-20 |       292          0 |       292 
 16-Sep-20 |       292          0 |       292 
 16-Oct-20 |       292          0 |       292 
 16-Nov-20 |       292          0 |       292 
 16-Dec-20 |       292          0 |       292 
 16-Jan-21 |       292          0 |       292 
 16-Feb-21 |       292          0 |       292 
 16-Mar-21 |       292          0 |       292 
-----------+----------------------+----------
     Total |     4,672      2,336 |     7,008 

. tab month16 post_mock2

    Month, |
defined as |
   16th of |        Post 2
this month |   (post-Interregnum
to 15th of |         only)
next month |         0          1 |     Total
-----------+----------------------+----------
 16-Apr-19 |       292          0 |       292 
 16-May-19 |       292          0 |       292 
 16-Jun-19 |       292          0 |       292 
 16-Jul-19 |       292          0 |       292 
 16-Aug-19 |       292          0 |       292 
 16-Sep-19 |       292          0 |       292 
 16-Oct-19 |       292          0 |       292 
 16-Nov-19 |       292          0 |       292 
 16-Dec-19 |       292          0 |       292 
 16-Jan-20 |       292          0 |       292 
 16-Feb-20 |       292          0 |       292 
 16-Mar-20 |       292          0 |       292 
 16-Apr-20 |       292          0 |       292 
 16-May-20 |       292          0 |       292 
 16-Jun-20 |       292          0 |       292 
 16-Jul-20 |       292          0 |       292 
 16-Aug-20 |       292          0 |       292 
 16-Sep-20 |       292          0 |       292 
 16-Oct-20 |         0        292 |       292 
 16-Nov-20 |       292          0 |       292 
 16-Dec-20 |         0        292 |       292 
 16-Jan-21 |         0        292 |       292 
 16-Feb-21 |         0        292 |       292 
 16-Mar-21 |         0        292 |       292 
-----------+----------------------+----------
     Total |     5,548      1,460 |     7,008 

. 
. ********************************************************************************
. ************************ [3] MAKE MONTH CAP & LOG VARS *************************
. ********************************************************************************
. 
. gen month_cap = 280000 if month16 >= td(16jul2019)
(876 missing values generated)

. replace month_cap = 200000 if month16 >= td(16oct2019)
(5,256 real changes made)

. replace month_cap = 180000 if month16 >= td(16nov2019)
(4,964 real changes made)

. replace month_cap = 170000 if month16 >= td(01jan2020)
(4,380 real changes made)

. label var month_cap "Month Cap (per Treatment Group)"

. 
. ** GENERATE LOG DEPENDENT VAR AND LOG COVARIATES
. 
. ** 10 rules: truncate at 99perc and 99.5perc at the monthly level for each of
. ** 5 sample restrictions (full, first 100, online by june, first 90, online by july)
. ** Code generating this: ETS/Data/ETS Analysis - 2020/2. Updated Version (June 2021)/2. Essential CEMS Working Data/0. Code/2b. 337 Stacks - Calibrated Stack-day Balanced STEM_v7.do
. if "`RuleNo'" != "M" {
.         
.         forvalues i=0(1)9{
  2.                 
.                 gen lnY_rule`i' = ln(Y_rule`i')
  3.                 label var lnY_rule`i' "Y=Ln(Plant Month PM Mass (kg) - trunc rule `i')"
  4.                 
.         }
. }

. else {
.         
.         forvalues i=0(1)9{      
  2.                 
.                 foreach imprule in mkt p50 p55 p60 p65 p70 p75 p80 p85 p90 p95 {
  3.                 
.                         gen lnY_rule_`imprule'_`i' = ln(Y_rule_`imprule'_`i')
  4.                         label var lnY_rule_`imprule'_`i' "Y=Ln(Plant Month PM Mass (kg) - trunc rule `i')"
  5. 
.                 
.                 }
  6.                 
.         }
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(3,212 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(4,447 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(5,071 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(4,707 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
(3,901 missing values generated)
.         
. }

. 
. 
. 
. ********************************************************************************
. ********************** [4] CHECK DATA SET AND LABEL VARS ***********************
. ********************************************************************************
. 
. ** CHECKING DATA SET
. 
. ** Used gpcb_id instead of industry_id because it's numeric. 
. ** gpcb_id and industry_id are uniquely identified 1-to-1; use them interchangeably.
. duplicates r gpcb_id month16    

Duplicates in terms of gpcb_id month16

--------------------------------------
   Copies | Observations       Surplus
----------+---------------------------
        1 |         7008             0
--------------------------------------

. tab D_treatment treatmentstatus

1=Treatmen |     Official ETS
        t, |      Assignment
 0=Control |   Control  Treatment |     Total
-----------+----------------------+----------
         0 |     3,264          0 |     3,264 
         1 |         0      3,744 |     3,744 
-----------+----------------------+----------
     Total |     3,264      3,744 |     7,008 

. 
. ** LABELING VARS
. order industry_id, a(gpcb_id)

. order industry_name, a(industry_id)

. label var industry_id "Industry ID (str)"

. label var gpcb_id "GPCB ID (num)"

. label var D_treatment "ETS Treatment"

. cap: label var Y_rule0 "PM/Month"

. cap: label var Y_rule1 "PM/Month"

. cap: label var lnY_rule0 "log(PM/Month)"

. cap: label var lnY_rule1 "log(PM/Month)"

. 
. sort gpcb_id month16

. save "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", replace
(file 02DataPipeline/emissions/RuleM_Panel.dta not found)
file 02DataPipeline/emissions/RuleM_Panel.dta saved

. 
. ********************************************************************************
. ***************************** [5] CREATES WEIGHTS ******************************
. ********************************************************************************
. 
. if "`RuleNo'" == "0" {
. 
.         ** GENERATE CEMS PHASE INDICATOR
.         encode cems_phase, gen(cems_phase_factor)
.         gen CEMS_3_4 = (cems_phase_factor == 3 | cems_phase_factor == 4)
.         label var CEMS_3_4 "CEMS Phase 3 or 4"
. 
.         ** Foreach month create a reporting dummy
.         local levels "apr2019 jul2019 oct2019 jan2020"
.         foreach l of local levels {
  2.                 gen online_16`l' = (month16 == td("16`l'") & !missing(Y_rule0))
  3.                 bysort gpcb_id: egen online_16`l'_ind = max(online_16`l')
  4.         }
.         label var online_16apr2019_ind "Online Apr 2019"
.         label var online_16jul2019_ind "Online Jul 2019"
.         label var online_16oct2019_ind "Online Oct 2019"
.         label var online_16jan2020_ind "Online Jan 2020"
. 
.         ** Collapse at the plant level (292 observations)
.         keep gpcb_id industry_id D_treatment online_*_ind CEMS_3_4 
.         duplicates drop
.         global cov_interest_weight = "CEMS_3_4" 
.         global months_subset "online_16jul2019_ind online_16oct2019_ind online_16jan2020_ind"
. 
.         foreach yvar of varlist $months_subset { 
  2. 
.                 tab `yvar'
  3. 
.                 * Compute probit
.                 eststo reg_`yvar': probit `yvar' $cov_interest_weight
  4.                 estadd local missingcov "Yes"
  5.                 estadd local model "Probit"
  6. 
.                 * predict
.                 predict `yvar'_hat
  7. 
.                 * construct weight
.                 qui sum `yvar'
  8.                 local S_unc = r(mean)
  9.                 gen newweight1_`yvar' = `S_unc' / `yvar'_hat 
 10. 
.                 * generate new var with coef
.                 gen coef_CEMS_`yvar' = _b[CEMS_3_4]
 11. 
.         }
. 
.         keep gpcb_id *_hat newweight1_*
.         tempfile weights_file
.         save `weights_file'
. 
.         ** MERGE TO FULL DATA
.         use "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", clear
.         merge m:1 gpcb_id using `weights_file'
.         gen newweight = newweight1_online_16oct2019
.         replace newweight = newweight1_online_16jul2019 if month16 <= date("October 1 2019","MDY")
.         replace newweight = newweight1_online_16jan2020 if month16 >= date("January 1 2020","MDY")
.         bysort month16: egen sum_newweight = sum(newweight)
.         gen newweight_normalized = newweight / sum_newweight
.         bysort month16: egen sum_newweight_nom = sum(newweight_normalized)
.         assert sum_newweight_nom == 1
.         drop _merge sum_newweight sum_newweight_nom
.         sort gpcb_id month16
. 
.         save "$EMISSIONS_DATA_OUT/Rule`RuleNo'_Panel.dta", replace
. 
. }

. 
end of do-file

. 
. * Create a data set of emissions based on different imputation rules
. do "$CODE_DIR/combine_emissions_rules.do"

. /*******************************************************************************
>            Purpose: Combine the emissions data created using different imputation rules
>    ****************************************************************************/
. 
. set more off

. clear all

. pause on

. 
. use "$IMPUTATION_DATA_OUT/PlantPeriodPMMassRule0.dta"
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. keep gpcb_id treatmentstatus period ind_period_mass_val_rule0

. rename ind_period_mass_val_rule0 pm_mass_val_0

. 
. merge 1:1 gpcb_id treatmentstatus period using "$IMPUTATION_DATA_OUT/PlantPeriodPMMassRuleA.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,920  (_merge==3)
    -----------------------------------------

. rename ind_period_mass_val_rule0 pm_mass_val_A

. keep gpcb_id treatmentstatus period pm_mass_val_0 pm_mass_val_A

. 
. merge 1:1 gpcb_id treatmentstatus period using "$IMPUTATION_DATA_OUT/PlantPeriodPMMassRuleB.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,920  (_merge==3)
    -----------------------------------------

. rename ind_period_mass_val_rule0 pm_mass_val_B

. keep gpcb_id treatmentstatus period pm_mass_val_0 pm_mass_val_A pm_mass_val_B

. 
. rename period period_num

. label var period_num "Compliance period number"

. 
. label var pm_mass_val_0 "Plant-period Validated Mass Emissions (kg) - Rule 0"

. label var pm_mass_val_A "Plant-period Validated Mass Emissions (kg) - Rule A"

. label var pm_mass_val_B "Plant-period Validated Mass Emissions (kg) - Rule B"

. 
. *** 292 plants x 10 period = 2,920 observations
. save "$EMISSIONS_DATA_OUT/pm_mass_plant-period.dta", replace
(file 02DataPipeline/emissions/pm_mass_plant-period.dta not found)
file 02DataPipeline/emissions/pm_mass_plant-period.dta saved

. 
end of do-file

. 
. * Construct a data set of potential maximum emissions
. do "$CODE_DIR/compute_potential_max_emissions.do"

. /************************************************************************
> Purpose:        Calculating a basic potential max. pollution measure for firms
> 
> Notes:          Conservative estimates have been used to generate the measures.
>                         1. Measures of flow are assumed to be constant across the chain (this is not true,
>                         the measures of max. pollution here are assuming no APCD devices and hence flow would be higher,
>                         but hence this makes this measure more conservative by assuming lower flow values)
>                         
>                         2. Assumption of outlet concentration is taken to be 2500 mg/Nm3 (this is a conservatively plausible estimate,
>                         high loads can be even higher)
>                         
>                         3. Operating hours are taken to be 12 hours and 16 hours (to account for overall closures, and low production periods)
> *************************************************************************/
. 
. set more off 

. clear matrix

. clear all

. pause on

. 
. import excel "$EMISSIONS_DATA_IN/master-data_flow-data_stack-level_surat-sample_20-04-2022_v3.xlsx", firstrow clear
(13 vars, 310 obs)

. 
. // drop FlowRange AverageflowCalib Averageflow Efrac16 Efrac12 R AverageUncontrolledMassmonth
. 
. label var composite_id "Composite ID"

. label var industry_id "Industry ID"

. label var gpcb_id "GPCB ID" 

. label var treatmentstatus "Treatment Status" 

. label var num_stacks "Number of Stacks"

. label var total_heat_output "Total Heat Output (Boiler/TFH/HAG)"

. label var flow_2020_m3ps "Flow in m3/s (March 2020)" 

. label var flow_2022_m3ps "Flow in m3/s (March 2022)" 

. label var flow_2020_m3ph "Flow in m3/h (March 2020)" 

. label var flow_2020_m3ph "Flow in m3/h (March 2022)" 

. label var flow_etsbl_m3ph "Flow in m3/h (ETS Baseline)" 

. label var flow_cemsbl_m3ph "Flow in m3/s (CEMS Baseline 2014)" 

. label var AveragePMMassmonth "Average PM Mass (kg)/month (Sample Period)"

. 
. egen FlowRangeMax = rowmax(flow_2020_m3ph flow_2022_m3ph flow_etsbl_m3ph flow_cemsbl_m3ph)

. egen FlowRangeMin = rowmin(flow_2020_m3ph flow_2022_m3ph flow_etsbl_m3ph flow_cemsbl_m3ph)

. gen FlowRangeR = FlowRangeMax - FlowRangeMin

. egen AverageFlowCalibr = rmean(flow_2020_m3ph flow_2022_m3ph)

. egen AverageFlowAll = rmean(flow_2020_m3ph flow_2022_m3ph flow_etsbl_m3ph flow_cemsbl_m3ph)

. 
. label var AverageFlowAll "Average across All" 

. label var AverageFlowCalibr "Average across Calibration only" 

. label var FlowRangeR "Max - Min of All m3/h values"

. 
. gen AverageUncontrolledMass12 = (AverageFlowAll*2500*12*30)/(1000*1000)

. gen AverageUncontrolledMass16 = (AverageFlowAll*2500*16*30)/(1000*1000)

. 
. //Assumptions:
. //1. Outlet conc. 2500 mg/Nm3 (conservative)
. //2. 12 hours or 16 hours of operation
. //3. 30-day period per month
. //Note: Divide by 1000*1000 to go from mg/month to kg/month
. 
. label var AverageUncontrolledMass12 "Average Uncontrolled PM Mass (kg)/month (12h/day)"

. label var AverageUncontrolledMass16 "Average Uncontrolled PM Mass (kg)/month (16h/day)"

. 
. gen Efrac12 = AveragePMMassmonth/AverageUncontrolledMass12

. gen Efrac16 = AveragePMMassmonth/AverageUncontrolledMass16

. 
. //If needed to be done on a GPCB-level
. collapse (mean) AverageFlowAll AverageFlowCalibr Efrac12 Efrac16 (sum) AveragePMMassmonth AverageUncontrolledMass12 AverageUncontrolledMass16, by(gpcb_id)

. 
. save "$EMISSIONS_DATA_OUT/potential_max_emissions", replace
(file 02DataPipeline/emissions/potential_max_emissions.dta not found)
file 02DataPipeline/emissions/potential_max_emissions.dta saved

. 
end of do-file

. 
. ************** Create scheme **************
. grstyle init

. grstyle yesno draw_major_hgrid no

. grstyle yesno draw_major_vgrid yes

. grstyle linepattern major_grid solid

. 
. * Table 1 and Table A4
. * Make ETS baseline balance table
. do "$CODE_DIR/make_balance_table_new.do"

. /*******************************************************************************
>            Authors: Dipika Gawande
>            Project: ETS
>            Purpose: Make balance tables
> 
>            Date created: 25 November 2020
>            Version:      STATA 15 MP
> 
>            Last edited: 30 June 2022
>            Edited by:   Jeanne, Vineet, Kaixin
>    ****************************************************************************/
.    
. set more off

. clear matrix

. clear all

. pause on

. 
. use "$BASELINE_DATA_OUT/BaselineCovariates.dta", clear
('IN-SAMPLE' ETS MASTER. 318 INDS. +TREATMENT)

. do "$CODE_DIR/diff_test.do"

. capt prog drop diffTest3

. program diffTest3, eclass
  1.   syntax varlist [if] [in], by(varname) [strata(varlist) ///
>          usestrat(integer 0) casewise(integer 1)] [ * ] 
  2.   marksample touse
  3.   markout `touse' `by'
  4.   tempname N N_1 N_2 sd_1 sd_2 mu_1 mu_2 d d_se d_t d_p
  5.   foreach var of local varlist {
  6.       if `casewise' == 0 {
  7.           qui ttest `var' if `touse', by(`by') `options'
  8.       }
  9.       else {
 10.            ttest `var', by(`by') `options'
 11.       }        
 12.       local N_T = r(N_1) + r(N_2)
 13.       mat `N'   = nullmat(`N'), `N_T'
 14.       mat `N_1' = nullmat(`N_1'), r(N_2)
 15.       mat `N_2' = nullmat(`N_2'), r(N_1)
 16.       mat `mu_1' = nullmat(`mu_1'), r(mu_2)
 17.       mat `mu_2' = nullmat(`mu_2'), r(mu_1)
 18.       mat `sd_1' = nullmat(`sd_1'), r(sd_2)
 19.       mat `sd_2' = nullmat(`sd_2'), r(sd_1)
 20.   
.       if `usestrat' {
 21.           qui xi: reg `var' `by' i.`strata', vce(robust)
 22.       }
 23.       else {
 24.           qui reg `var' `by', vce(robust)
 25.       }
 26.       mat `d'    = nullmat(`d'   ), _b[`by']
 27.       mat `d_se' = nullmat(`d_se'), _se[`by']
 28.       mat `d_t'  = nullmat(`d_t' ), (_b[`by']/_se[`by'])
 29.       mat `d_p'  = nullmat(`d_p' ), (2*ttail( e(df_r), abs(_b[`by']/_se[`by'])))
 30.   }
 31.   foreach mat in mu_1 mu_2 sd_1 sd_2 d d_se d_t d_p N N_1 N_2 {
 32.       mat coln ``mat'' = `varlist'
 33.   }
 34.   tempname b V
 35.   mat `b' = `mu_1'*0
 36.   mat `V' = `b''*`b'
 37.   eret post `b' `V'
 38.   eret local cmd "meanDiffTable"
 39.   foreach mat in mu_1 mu_2 sd_1 sd_2 d d_se d_t d_p N N_1 N_2 {
 40.       eret mat `mat' = ``mat''
 41.   }
 42. 
. end

. 
end of do-file

. 
. ********************************************************************************
. ************************ [1] BALANCE CHECK (FULL SAMPLE) ***********************
. ********************************************************************************
. 
. gen D_small_scale = (size == 1)

. replace D_small_scale = . if size == .
(14 real changes made, 14 to missing)

. gen D_large_scale = (size == 3)

. replace D_large_scale = . if size == .
(14 real changes made, 14 to missing)

. replace boi_year = . if D_boi_year_missing == 1
(31 real changes made, 31 to missing)

. replace bh_total_workers = . if D_bh_total_workers_missing == 1
(14 real changes made, 14 to missing)

. replace bh_ope_cost_USD = . if D_bh_ope_cost_missing == 1
(14 real changes made, 14 to missing)

. replace bh_total_capex_USD = . if D_bh_total_capex_missing == 1
(34 real changes made, 34 to missing)

. replace grossrev_17_18_clean_USD = grossrev_17_18_clean_USD / 1000
(290 real changes made)

. replace bh_total_capex_USD = bh_total_capex_USD / 1000
(284 real changes made)

. replace bh_ope_cost_USD = bh_ope_cost_USD / 1000
(304 real changes made)

. replace elecbill_2017_clean_USD = elecbill_2017_clean_USD / 1000
(287 real changes made)

. gen above_standard = pm_conc_etsbl > 150

. replace above_standard = . if pm_conc_etsbl == .
(14 real changes made, 14 to missing)

. 
. 
. local cov_interest_A = "elecbill_2017_clean_USD ln_plant_total_heatoutput size D_small_scale D_large_scale pm_cnsnt_stcks D_textiles grossrev_17_18_clean_USD"

. local cov_interest_B = "bh_total_workers bh_total_capex_USD bh_ope_cost_USD D_cyc D_bf D_scr D_esp"

. local cov_interest_C = "pm_mass_etsbl pm_conc_etsbl mean_ring_premock above_standard"

. 
. label var grossrev_17_18_clean_USD "Gross Sales Revenue in 2017 (1,000 USD)"

. label var elecbill_2017_clean_USD "Total electricity cost (1,000 USD)"

. label var ln_plant_total_heatoutput "Log(plant total heat output)"

. label var size "Size as recorded on environment consent (1 to 3)"

. label var D_small_scale "Small-scale (size=1)"

. label var D_large_scale "Large-scale (size=3)"

. label var pm_cnsnt_stcks "Number of stacks"

. label var D_textiles "Textiles sector (=1)"

. label var bh_total_workers "Boiler house employment"

. label var bh_total_capex_USD "Boiler house capital expenditure (1,000 USD)"

. label var bh_ope_cost_USD "Boiler house operating cost (1,000 USD)"

. label var D_cyc "APCD: Cyclone present"

. label var D_bf "APCD: Bag ﬁlter present"

. label var D_scr "APCD: Scrubber present"

. label var D_esp "APCD: ESP present"

. label var pm_mass_etsbl "Plant total PM mass rate (kg/hr)"

. label var pm_conc_etsbl "Plant mean PM concentration (mg/Nm\textsuperscript{3})"

. label var mean_ring_premock "Plant mean Ringelmann score (1 to 5)"

. label var above_standard "Above regulatory standard at ETS baseline (=1)"

. 
. diffTest3 `cov_interest_A', by(D_treatment)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     140    389.1134    55.83756    660.6789    278.7126    499.5142
       1 |     148    456.2341    70.12286    853.0814     317.655    594.8132
---------+--------------------------------------------------------------------
Combined |     288     423.606    45.08027    765.0376    334.8761    512.3359
---------+--------------------------------------------------------------------
    diff |           -67.12072    90.26568               -244.7901    110.5486
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.7436
H0: diff = 0                                     Degrees of freedom =      286

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2289         Pr(|T| > |t|) = 0.4577          Pr(T > t) = 0.7711

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     156    15.50164     .047109    .5883915    15.40858     15.5947
       1 |     162    15.58653    .0481956    .6134293    15.49135    15.68171
---------+--------------------------------------------------------------------
Combined |     318    15.54489    .0337491     .601832    15.47849    15.61129
---------+--------------------------------------------------------------------
    diff |           -.0848874     .067448               -.2175914    .0478166
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.2586
H0: diff = 0                                     Degrees of freedom =      316

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1046         Pr(|T| > |t|) = 0.2091          Pr(T > t) = 0.8954

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    1.401361    .0534521    .6480726    1.295721       1.507
       1 |     157    1.363057    .0504373    .6319776    1.263429    1.462686
---------+--------------------------------------------------------------------
Combined |     304    1.381579    .0366515    .6390402    1.309455    1.453703
---------+--------------------------------------------------------------------
    diff |            .0383032    .0734309               -.1061978    .1828042
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.5216
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.6988         Pr(|T| > |t|) = 0.6023          Pr(T > t) = 0.3012

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    .6870748    .0383748    .4652694     .611233    .7629166
       1 |     157    .7197452    .0359587    .4505608    .6487165    .7907739
---------+--------------------------------------------------------------------
Combined |     304    .7039474    .0262261    .4572672    .6523391    .7555557
---------+--------------------------------------------------------------------
    diff |           -.0326704    .0525337               -.1360489    .0707081
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.6219
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2672         Pr(|T| > |t|) = 0.5345          Pr(T > t) = 0.7328

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    .0884354     .023498    .2848977    .0419953    .1348755
       1 |     157    .0828025    .0220643    .2764654    .0392191     .126386
---------+--------------------------------------------------------------------
Combined |     304    .0855263    .0160662    .2801244    .0539108    .1171418
---------+--------------------------------------------------------------------
    diff |            .0056328    .0322014               -.0577348    .0690004
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.1749
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.5694         Pr(|T| > |t|) = 0.8613          Pr(T > t) = 0.4306

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    1.047619    .0176246    .2136869    1.012787    1.082451
       1 |     157    1.082803    .0325338    .4076478    1.018539    1.147066
---------+--------------------------------------------------------------------
Combined |     304    1.065789     .018837    .3284337    1.028722    1.102857
---------+--------------------------------------------------------------------
    diff |           -.0351835    .0377024               -.1093761    .0390091
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.9332
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1757         Pr(|T| > |t|) = 0.3515          Pr(T > t) = 0.8243

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    .8503401    .0295238    .3579573    .7919909    .9086894
       1 |     157    .8471338    .0288117    .3610101    .7902223    .9040452
---------+--------------------------------------------------------------------
Combined |     304    .8486842     .020587    .3589473    .8081725    .8891959
---------+--------------------------------------------------------------------
    diff |            .0032064    .0412641               -.0779952     .084408
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.0777
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.5309         Pr(|T| > |t|) = 0.9381          Pr(T > t) = 0.4691

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     141    13628.35     4485.21    53258.92    4760.847    22495.85
       1 |     150    12614.51    3486.281    42698.05    5725.575    19503.45
---------+--------------------------------------------------------------------
Combined |     291    13105.75    2815.224    48024.12    7564.891    18646.61
---------+--------------------------------------------------------------------
    diff |            1013.835    5642.565                -10091.9    12119.57
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.1797
H0: diff = 0                                     Degrees of freedom =      289

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.5712         Pr(|T| > |t|) = 0.8575          Pr(T > t) = 0.4288

. esttab using "$EMISSIONS_TABS/Table_A4.tex", replace fragment ///
>         noobs nomtitles nonumbers collabels("Treatment" "Control" "Difference") ///
>         varwidth(32) label nogap compress booktabs width(0.75\hsize) ///
>         cells("mu_1(fmt(a2))          mu_2           d(star pvalue(d_p))" ///
>                   "sd_1(fmt(a2) par([ ])) sd_2(par([ ])) d_se(par)") ///
>         star(* 0.10 ** 0.05 *** 0.01) ///
>         prehead( ///
>                 "\begin{longtable}{lccc}" ///
>                 "\caption{Balance of plant characteristics by treatment status, full sample}" ///
>                 "\label{tab:balanceFull} \\" ///
>                 "\toprule") ///
>         posthead( ///
>           "&(1)&(2)&(3)\\" ///
>                 "\midrule" ///
>                 "\addlinespace" ///
>                 "\multicolumn{4}{c}{\textit{Panel A: Plant Measures}} \\" ) /// 
>         postfoot("\addlinespace\addlinespace")
(file 03Output/tables/Table_A4.tex not found)
(output written to 03Output/tables/Table_A4.tex)

.                 
. diffTest3 `cov_interest_B', by(D_treatment)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    31.71429    2.475714    30.01643    26.82142    36.60715
       1 |     157    36.84713    2.594564    32.50979    31.72212    41.97214
---------+--------------------------------------------------------------------
Combined |     304    34.36513    1.799926    31.38279    30.82319    37.90707
---------+--------------------------------------------------------------------
    diff |           -5.132848     3.59565               -12.20855    1.942852
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.4275
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0772         Pr(|T| > |t|) = 0.1545          Pr(T > t) = 0.9228

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     137    164.2441    16.30771    190.8769    131.9946    196.4935
       1 |     147    198.2672    32.87741    398.6174    133.2901    263.2444
---------+--------------------------------------------------------------------
Combined |     284    181.8546     18.7434    315.8695    144.9605    218.7488
---------+--------------------------------------------------------------------
    diff |           -34.02319    37.52186               -107.8817    39.83528
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.9068
H0: diff = 0                                     Degrees of freedom =      282

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1827         Pr(|T| > |t|) = 0.3653          Pr(T > t) = 0.8173

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    110.9971    6.998784    84.85574    97.16512    124.8292
       1 |     157    138.1328    16.16872    202.5935    106.1949    170.0706
---------+--------------------------------------------------------------------
Combined |     304    125.0113    9.029496    157.4346    107.2428    142.7797
---------+--------------------------------------------------------------------
    diff |           -27.13563    18.03118               -62.61829    8.347021
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.5049
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0667         Pr(|T| > |t|) = 0.1334          Pr(T > t) = 0.9333

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    .9727891    .0134649    .1632537    .9461778    .9994005
       1 |     157    .9808917    .0109612    .1373437    .9592402    1.002543
---------+--------------------------------------------------------------------
Combined |     304    .9769737    .0086165    .1502343    .9600179    .9939295
---------+--------------------------------------------------------------------
    diff |           -.0081026    .0172646               -.0420768    .0258716
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.4693
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.3196         Pr(|T| > |t|) = 0.6392          Pr(T > t) = 0.6804

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    .8571429    .0289602    .3511234    .7999075    .9143782
       1 |     157    .8025478    .0318716    .3993503    .7395922    .8655034
---------+--------------------------------------------------------------------
Combined |     304    .8289474    .0216325    .3771758    .7863784    .8715164
---------+--------------------------------------------------------------------
    diff |            .0545951    .0432461               -.0305068     .139697
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   1.2624
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.8961         Pr(|T| > |t|) = 0.2078          Pr(T > t) = 0.1039

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    .6054422    .0404497    .4904265    .5254996    .6853848
       1 |     157    .6369427    .0385013      .48242    .5608915    .7129938
---------+--------------------------------------------------------------------
Combined |     304    .6217105    .0278602      .48576    .5668865    .6765346
---------+--------------------------------------------------------------------
    diff |           -.0315005    .0558135                -.141333     .078332
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.5644
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2865         Pr(|T| > |t|) = 0.5729          Pr(T > t) = 0.7135

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    .0816327    .0226602    .2747403    .0368483     .126417
       1 |     157    .1146497    .0255083    .3196182    .0642634    .1650359
---------+--------------------------------------------------------------------
Combined |     304    .0986842    .0171333    .2987293    .0649689    .1323995
---------+--------------------------------------------------------------------
    diff |            -.033017    .0342893               -.1004932    .0344591
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.9629
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1682         Pr(|T| > |t|) = 0.3364          Pr(T > t) = 0.8318

. esttab using "$EMISSIONS_TABS/Table_A4.tex", append fragment ///
>         noobs nomtitles nonumbers collabels(none) ///
>         varwidth(32) label nogap booktabs width(0.75\hsize) eqlabel(none) ///
>         cells("mu_1(fmt(a2))          mu_2           d(star pvalue(d_p))" ///
>                   "sd_1(fmt(a2) par([ ])) sd_2(par([ ])) d_se(par)") ///
>         star(* 0.10 ** 0.05 *** 0.01) ///
>         prehead("\multicolumn{4}{c}{\textit{Panel B: Plant Abatement and Investment Cost}} \\") ///
>         posthead("") /// 
>         prefoot("") ///
>         postfoot("\addlinespace\addlinespace")
(output written to 03Output/tables/Table_A4.tex)

.         
. diffTest3 `cov_interest_C', by(D_treatment)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    3.514246    .3098782    3.757074    2.901819    4.126672
       1 |     157    3.622914    .3878017    4.859141    2.856894    4.388934
---------+--------------------------------------------------------------------
Combined |     304    3.570367    .2497422    4.354403    3.078919    4.061816
---------+--------------------------------------------------------------------
    diff |           -.1086682    .5005424               -1.093661    .8763243
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.2171
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.4141         Pr(|T| > |t|) = 0.8283          Pr(T > t) = 0.5859

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    168.5438    12.49365    151.4774    143.8521    193.2356
       1 |     157    177.9167    12.25473    153.5513    153.7101    202.1233
---------+--------------------------------------------------------------------
Combined |     304    173.3844    8.739163    152.3725    156.1873    190.5816
---------+--------------------------------------------------------------------
    diff |           -9.372844    17.50841               -43.82678    25.08109
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.5353
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2964         Pr(|T| > |t|) = 0.5928          Pr(T > t) = 0.7036

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     148    1.353247    .0307656    .3742796    1.292447    1.414047
       1 |     160    1.362225    .0334419    .4230101    1.296178    1.428273
---------+--------------------------------------------------------------------
Combined |     308    1.357911    .0227758     .399714    1.313094    1.402727
---------+--------------------------------------------------------------------
    diff |           -.0089781    .0456578               -.0988211    .0808649
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.1966
H0: diff = 0                                     Degrees of freedom =      306

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.4221         Pr(|T| > |t|) = 0.8442          Pr(T > t) = 0.5779

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     147    .2789116    .0371151    .4499972    .2055592    .3522639
       1 |     157    .3312102     .037682    .4721546    .2567773     .405643
---------+--------------------------------------------------------------------
Combined |     304    .3059211    .0264721    .4615562    .2538287    .3580134
---------+--------------------------------------------------------------------
    diff |           -.0522986     .052975               -.1565455    .0519483
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.9872
H0: diff = 0                                     Degrees of freedom =      302

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1622         Pr(|T| > |t|) = 0.3243          Pr(T > t) = 0.8378

. esttab using "$EMISSIONS_TABS/Table_A4.tex", append fragment ///
>         noobs nomtitles nonumbers collabels(none) ///
>         varwidth(32) label  nogap booktabs width(0.75\hsize) eqlabel(none) ///
>         cells("mu_1(fmt(a2))          mu_2           d(star pvalue(d_p))" ///
>                   "sd_1(fmt(a2) par([ ])) sd_2(par([ ])) d_se(par)") ///
>         star(* 0.10 ** 0.05 *** 0.01) ///
>         prehead("\multicolumn{4}{c}{\textit{Panel C: Plant Pollution Measures}} \\") ///
>         posthead("") /// 
>         prefoot("\addlinespace\addlinespace") ///
>         postfoot( ///
>                 "Number of plants & 162 & 156 & \\" ///
>                 "\bottomrule\\[-5.2ex]" ///
>                 "\insertTableNotes" ///
>                 "\end{longtable}" )
(output written to 03Output/tables/Table_A4.tex)

.                 
. 
. di "Data for Table A2: Distribution of number of stacks by plant"
Data for Table A2: Distribution of number of stacks by plant

. tab pm_cnsnt_stcks

  Number of |
     stacks |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        289       95.07       95.07
          2 |         12        3.95       99.01
          3 |          1        0.33       99.34
          4 |          2        0.66      100.00
------------+-----------------------------------
      Total |        304      100.00

. tab pm_cnsnt_stcks if D_treatment == 1

  Number of |
     stacks |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        149       94.90       94.90
          2 |          5        3.18       98.09
          3 |          1        0.64       98.73
          4 |          2        1.27      100.00
------------+-----------------------------------
      Total |        157      100.00

. tab pm_cnsnt_stcks if D_treatment == 0

  Number of |
     stacks |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        140       95.24       95.24
          2 |          7        4.76      100.00
------------+-----------------------------------
      Total |        147      100.00

. 
. ********************************************************************************
. ********************** [2] BALANCE CHECK (ANALYSIS SAMPLE) *********************
. ********************************************************************************
. 
. merge 1:m gpcb_id using "$IMPUTATION_DATA_OUT/PlantMonthPMMassRule0.dta", 

    Result                      Number of obs
    -----------------------------------------
    Not matched                            26
        from master                        26  (_merge==1)
        from using                          0  (_merge==2)

    Matched                             7,008  (_merge==3)
    -----------------------------------------

. keep if _merge == 3
(26 observations deleted)

. bysort industry_id: gen dump=_n

. bysort industry_id: keep if _n==_N
(6,716 observations deleted)

.         
. diffTest3 `cov_interest_A', by(D_treatment)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     127    345.7527    29.01823    327.0189    288.3265     403.179
       1 |     142    467.6409    72.92859    869.0445     323.466    611.8157
---------+--------------------------------------------------------------------
Combined |     269    410.0952    40.96151    671.8187    329.4479    490.7425
---------+--------------------------------------------------------------------
    diff |           -121.8881    81.86505               -283.0713    39.29503
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.4889
H0: diff = 0                                     Degrees of freedom =      267

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0688         Pr(|T| > |t|) = 0.1377          Pr(T > t) = 0.9312

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     136    15.58653    .0425896    .4966761     15.5023    15.67076
       1 |     156    15.59873    .0495448    .6188137    15.50086     15.6966
---------+--------------------------------------------------------------------
Combined |     292    15.59304    .0330238    .5643102    15.52805    15.65804
---------+--------------------------------------------------------------------
    diff |           -.0121957    .0663132               -.1427118    .1183204
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.1839
H0: diff = 0                                     Degrees of freedom =      290

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.4271         Pr(|T| > |t|) = 0.8542          Pr(T > t) = 0.5729

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    1.365672    .0535373    .6197385    1.259777    1.471566
       1 |     151    1.370861    .0519941    .6389146    1.268125    1.473596
---------+--------------------------------------------------------------------
Combined |     285    1.368421    .0372511    .6288705    1.295098    1.441744
---------+--------------------------------------------------------------------
    diff |           -.0051893    .0747662               -.1523576    .1419791
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.0694
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.4724         Pr(|T| > |t|) = 0.9447          Pr(T > t) = 0.5276

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    .7089552     .039388    .4559486    .6310474    .7868631
       1 |     151    .7152318    .0368488    .4528058     .642422    .7880416
---------+--------------------------------------------------------------------
Combined |     285    .7122807    .0268628    .4534959    .6594053    .7651561
---------+--------------------------------------------------------------------
    diff |           -.0062766    .0539151               -.1124021     .099849
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.1164
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.4537         Pr(|T| > |t|) = 0.9074          Pr(T > t) = 0.5463

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    .0746269    .0227866    .2637744    .0295558    .1196979
       1 |     151    .0860927    .0229028    .2814344    .0408389    .1313465
---------+--------------------------------------------------------------------
Combined |     285    .0807018    .0161626    .2728557    .0488881    .1125154
---------+--------------------------------------------------------------------
    diff |           -.0114658    .0324328                -.075306    .0523743
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.3535
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.3620         Pr(|T| > |t|) = 0.7240          Pr(T > t) = 0.6380

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    1.044776    .0179329    .2075881    1.009306    1.080247
       1 |     151     1.07947    .0332536    .4086266    1.013764    1.145176
---------+--------------------------------------------------------------------
Combined |     285    1.063158    .0195271     .329656    1.024722    1.101594
---------+--------------------------------------------------------------------
    diff |           -.0346941    .0391387                -.111734    .0423458
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.8864
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1881         Pr(|T| > |t|) = 0.3761          Pr(T > t) = 0.8119

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    .8731343    .0288594    .3340713    .8160516     .930217
       1 |     151    .8476821    .0293391    .3605245    .7897109    .9056533
---------+--------------------------------------------------------------------
Combined |     285    .8596491    .0206115    .3479617    .8190785    .9002198
---------+--------------------------------------------------------------------
    diff |            .0254522    .0413417                -.055924    .1068285
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.6157
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.7307         Pr(|T| > |t|) = 0.5386          Pr(T > t) = 0.2693

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     129    9754.961    3503.156     39788.2    2823.369    16686.55
       1 |     144     13010.5    3627.891    43534.69    5839.281    20181.73
---------+--------------------------------------------------------------------
Combined |     273    11472.17    2527.541    41761.82    6496.141     16448.2
---------+--------------------------------------------------------------------
    diff |           -3255.543    5068.204                -13233.6    6722.516
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.6423
H0: diff = 0                                     Degrees of freedom =      271

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2606         Pr(|T| > |t|) = 0.5212          Pr(T > t) = 0.7394

. esttab using "$EMISSIONS_TABS/Table_1.tex", replace fragment ///
>         noobs nomtitles nonumbers collabels("Treatment" "Control" "Difference") ///
>         varwidth(32) label nogap compress booktabs width(0.75\hsize) ///
>         cells("mu_1(fmt(a2))          mu_2           d(star pvalue(d_p))" ///
>                   "sd_1(fmt(a2) par([ ])) sd_2(par([ ])) d_se(par)") ///
>         star(* 0.10 ** 0.05 *** 0.01) ///
>         prehead( ///
>                 "\begin{longtable}{lccc}" ///
>                 "\caption{Balance of plant characteristics by treatment status}" ///
>                 "\label{tab:balance} \\" ///
>                 "\toprule") ///
>         posthead( ///
>           "&(1)&(2)&(3)\\" ///
>                 "\midrule" ///
>                 "\addlinespace" ///
>                 "\multicolumn{4}{c}{\textit{Panel A: Plant Measures}} \\" ) /// 
>         postfoot("\addlinespace\addlinespace")
(file 03Output/tables/Table_1.tex not found)
(output written to 03Output/tables/Table_1.tex)

.                 
. diffTest3 `cov_interest_B', by(D_treatment)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    32.29851    2.537233     29.3706    27.27996    37.31706
       1 |     151    36.92053    2.676816    32.89327    31.63139    42.20966
---------+--------------------------------------------------------------------
Combined |     285    34.74737    1.855084    31.31742    31.09591    38.39883
---------+--------------------------------------------------------------------
    diff |           -4.622022    3.713196               -11.93101    2.686966
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.2448
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1071         Pr(|T| > |t|) = 0.2143          Pr(T > t) = 0.8929

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     125    171.4122    17.58085    196.5599    136.6147    206.2096
       1 |     142    199.9084    33.98781    405.0115    132.7169       267.1
---------+--------------------------------------------------------------------
Combined |     267    186.5675    19.84624    324.2902    147.4918    225.6432
---------+--------------------------------------------------------------------
    diff |           -28.49627    39.80968               -106.8798    49.88724
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.7158
H0: diff = 0                                     Degrees of freedom =      265

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2374         Pr(|T| > |t|) = 0.4747          Pr(T > t) = 0.7626

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    112.3977    7.269979    84.15609    98.01794    126.7774
       1 |     151    140.3837    16.78521    206.2601    107.2177    173.5497
---------+--------------------------------------------------------------------
Combined |     285    127.2253    9.548123    161.1909    108.4313    146.0194
---------+--------------------------------------------------------------------
    diff |           -27.98598    19.09174               -65.56581    9.593844
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.4659
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0719         Pr(|T| > |t|) = 0.1438          Pr(T > t) = 0.9281

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    .9701493    .0147561     .170814    .9409623    .9993362
       1 |     151    .9801325    .0113938    .1400095    .9576194    1.002646
---------+--------------------------------------------------------------------
Combined |     285    .9754386    .0091848    .1550564    .9573598    .9935174
---------+--------------------------------------------------------------------
    diff |           -.0099832    .0184252                -.046251    .0262846
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.5418
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2942         Pr(|T| > |t|) = 0.5884          Pr(T > t) = 0.7058

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134     .880597    .0281171    .3254789    .8249825    .9362115
       1 |     151    .8013245    .0325785     .400331    .7369525    .8656965
---------+--------------------------------------------------------------------
Combined |     285    .8385965     .021831    .3685499    .7956254    .8815676
---------+--------------------------------------------------------------------
    diff |            .0792725     .043563               -.0064761    .1650211
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   1.8197
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9651         Pr(|T| > |t|) = 0.0699          Pr(T > t) = 0.0349

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    .6119403     .042255    .4891368    .5283616     .695519
       1 |     151    .6423841    .0391345    .4808932     .565058    .7197102
---------+--------------------------------------------------------------------
Combined |     285    .6280702    .0286798      .48417    .5716183     .684522
---------+--------------------------------------------------------------------
    diff |           -.0304438    .0575348               -.1436943    .0828067
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.5291
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2986         Pr(|T| > |t|) = 0.5971          Pr(T > t) = 0.7014

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    .0746269    .0227866    .2637744    .0295558    .1196979
       1 |     151    .1192053    .0264569    .3251082    .0669289    .1714817
---------+--------------------------------------------------------------------
Combined |     285    .0982456    .0176621      .29817    .0634804    .1330108
---------+--------------------------------------------------------------------
    diff |           -.0445784    .0353504               -.1141616    .0250047
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.2610
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1042         Pr(|T| > |t|) = 0.2083          Pr(T > t) = 0.8958

. esttab using "$EMISSIONS_TABS/Table_1.tex", append fragment ///
>         noobs nomtitles nonumbers collabels(none) ///
>         varwidth(32) label nogap booktabs width(0.75\hsize) eqlabel(none) ///
>         cells("mu_1(fmt(a2))          mu_2           d(star pvalue(d_p))" ///
>                   "sd_1(fmt(a2) par([ ])) sd_2(par([ ])) d_se(par)") ///
>         star(* 0.10 ** 0.05 *** 0.01) ///
>         prehead("\multicolumn{4}{c}{\textit{Panel B: Plant Abatement and Investment Cost}} \\") ///
>         posthead("") /// 
>         prefoot("") ///
>         postfoot("\addlinespace\addlinespace")
(output written to 03Output/tables/Table_1.tex)

.         
. diffTest3 `cov_interest_C', by(D_treatment)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    3.595565    .3300931    3.821104    2.942654    4.248476
       1 |     151    3.622196    .4024109    4.944908     2.82707    4.417321
---------+--------------------------------------------------------------------
Combined |     285    3.609675    .2632639    4.444405    3.091479    4.127871
---------+--------------------------------------------------------------------
    diff |           -.0266306    .5283957               -1.066715    1.013454
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.0504
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.4799         Pr(|T| > |t|) = 0.9598          Pr(T > t) = 0.5201

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134     168.805    12.97618    150.2101    143.1387    194.4714
       1 |     151     179.013    12.70093    156.0716    153.9172    204.1089
---------+--------------------------------------------------------------------
Combined |     285    174.2135    9.072396    153.1597    156.3558    192.0712
---------+--------------------------------------------------------------------
    diff |           -10.20801    18.19913               -46.03085    25.61483
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.5609
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2877         Pr(|T| > |t|) = 0.5753          Pr(T > t) = 0.7123

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    1.352011    .0318059    .3681796      1.2891    1.414922
       1 |     155    1.368605     .034313    .4271932     1.30082     1.43639
---------+--------------------------------------------------------------------
Combined |     289    1.360911     .023548     .400316    1.314563    1.407259
---------+--------------------------------------------------------------------
    diff |           -.0165944    .0472929               -.1096792    .0764905
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.3509
H0: diff = 0                                     Degrees of freedom =      287

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.3630         Pr(|T| > |t|) = 0.7259          Pr(T > t) = 0.6370

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     134    .2835821    .0390838    .4524277    .2062758    .3608883
       1 |     151    .3377483    .0386156    .4745161    .2614476    .4140491
---------+--------------------------------------------------------------------
Combined |     285    .3122807    .0274991    .4642388    .2581527    .3664087
---------+--------------------------------------------------------------------
    diff |           -.0541663    .0550996               -.1626234    .0542909
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.9831
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1632         Pr(|T| > |t|) = 0.3264          Pr(T > t) = 0.8368

. esttab using "$EMISSIONS_TABS/Table_1.tex", append fragment ///
>         noobs nomtitles nonumbers collabels(none) ///
>         varwidth(32) label  nogap booktabs width(0.75\hsize) eqlabel(none) ///
>         cells("mu_1(fmt(a2))          mu_2           d(star pvalue(d_p))" ///
>                   "sd_1(fmt(a2) par([ ])) sd_2(par([ ])) d_se(par)") ///
>         star(* 0.10 ** 0.05 *** 0.01) ///
>         prehead("\multicolumn{4}{c}{\textit{Panel C: Plant Pollution Measures}} \\") ///
>         posthead("") /// 
>         prefoot("\addlinespace\addlinespace") ///
>         postfoot( ///
>                 "Number of plants & 156 & 136 & \\" ///
>                 "\bottomrule\\[-5.2ex]" ///
>                 "\insertTableNotes" ///
>                 "\end{longtable}" )
(output written to 03Output/tables/Table_1.tex)

. 
end of do-file

. 
. * Table F3
. * Make ETS baseline balance table for reporting above/below median
. do "$CODE_DIR/make_balance_table_reporting_split.do"

. /*******************************************************************************
>            Authors: Neil Himwich
>            Project: ETS
>       Purpose: Make balance tables split by whether or not the firms reported more
>                than the median level.
> 
>            Date created: June 16 2023
>            Version:      STATA 17 MP
> 
>            Last edited: June 16 2023
>       Edited by: Neil
> ****************************************************************************/
. 
. set more off

. clear matrix

. clear all

. pause on

. 
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. 
. * Need to get a measure on per industry level of reporting: Find average across all stacks per day and mean across days
. * Need this as the baseline covariates are only at the industry level
. bysort date gpcb_id: egen tot_report_hrs_id_day = mean(tot_report_hrs)

. bysort date gpcb_id: keep if _n==1
(13,661 observations deleted)

. bysort gpcb_id: egen mean_report_hrs_id = mean(tot_report_hrs_id_day)

. bysort gpcb_id: keep if _n==1
(228,324 observations deleted)

. keep gpcb_id mean_report_hrs_id

. 
. merge 1:1 gpcb_id using "$BASELINE_DATA_OUT/BaselineCovariates.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               318  (_merge==3)
    -----------------------------------------

. ** All matched
. drop _merge

. _pctile mean_report_hrs_id, p(50)

. gen D_high_report = mean_report_hrs_id>`r(r1)'

. 
. do "$CODE_DIR/diff_test.do"

. capt prog drop diffTest3

. program diffTest3, eclass
  1.   syntax varlist [if] [in], by(varname) [strata(varlist) ///
>          usestrat(integer 0) casewise(integer 1)] [ * ] 
  2.   marksample touse
  3.   markout `touse' `by'
  4.   tempname N N_1 N_2 sd_1 sd_2 mu_1 mu_2 d d_se d_t d_p
  5.   foreach var of local varlist {
  6.       if `casewise' == 0 {
  7.           qui ttest `var' if `touse', by(`by') `options'
  8.       }
  9.       else {
 10.            ttest `var', by(`by') `options'
 11.       }        
 12.       local N_T = r(N_1) + r(N_2)
 13.       mat `N'   = nullmat(`N'), `N_T'
 14.       mat `N_1' = nullmat(`N_1'), r(N_2)
 15.       mat `N_2' = nullmat(`N_2'), r(N_1)
 16.       mat `mu_1' = nullmat(`mu_1'), r(mu_2)
 17.       mat `mu_2' = nullmat(`mu_2'), r(mu_1)
 18.       mat `sd_1' = nullmat(`sd_1'), r(sd_2)
 19.       mat `sd_2' = nullmat(`sd_2'), r(sd_1)
 20.   
.       if `usestrat' {
 21.           qui xi: reg `var' `by' i.`strata', vce(robust)
 22.       }
 23.       else {
 24.           qui reg `var' `by', vce(robust)
 25.       }
 26.       mat `d'    = nullmat(`d'   ), _b[`by']
 27.       mat `d_se' = nullmat(`d_se'), _se[`by']
 28.       mat `d_t'  = nullmat(`d_t' ), (_b[`by']/_se[`by'])
 29.       mat `d_p'  = nullmat(`d_p' ), (2*ttail( e(df_r), abs(_b[`by']/_se[`by'])))
 30.   }
 31.   foreach mat in mu_1 mu_2 sd_1 sd_2 d d_se d_t d_p N N_1 N_2 {
 32.       mat coln ``mat'' = `varlist'
 33.   }
 34.   tempname b V
 35.   mat `b' = `mu_1'*0
 36.   mat `V' = `b''*`b'
 37.   eret post `b' `V'
 38.   eret local cmd "meanDiffTable"
 39.   foreach mat in mu_1 mu_2 sd_1 sd_2 d d_se d_t d_p N N_1 N_2 {
 40.       eret mat `mat' = ``mat''
 41.   }
 42. 
. end

. 
end of do-file

. 
. ********************************************************************************
. ************************ [1] BALANCE CHECK (FULL SAMPLE) ***********************
. ********************************************************************************
. 
. gen D_small_scale = (size == 1)

. replace D_small_scale = . if size == .
(14 real changes made, 14 to missing)

. gen D_large_scale = (size == 3)

. replace D_large_scale = . if size == .
(14 real changes made, 14 to missing)

. replace boi_year = . if D_boi_year_missing == 1
(31 real changes made, 31 to missing)

. replace bh_total_workers = . if D_bh_total_workers_missing == 1
(14 real changes made, 14 to missing)

. replace bh_ope_cost_USD = . if D_bh_ope_cost_missing == 1
(14 real changes made, 14 to missing)

. replace bh_total_capex_USD = . if D_bh_total_capex_missing == 1
(34 real changes made, 34 to missing)

. replace grossrev_17_18_clean_USD = grossrev_17_18_clean_USD / 1000
(290 real changes made)

. replace bh_total_capex_USD = bh_total_capex_USD / 1000
(284 real changes made)

. replace bh_ope_cost_USD = bh_ope_cost_USD / 1000
(304 real changes made)

. replace elecbill_2017_clean_USD = elecbill_2017_clean_USD / 1000
(287 real changes made)

. gen above_standard = pm_conc_etsbl > 150

. replace above_standard = . if pm_conc_etsbl == .
(14 real changes made, 14 to missing)

. 
. 
. local cov_interest_A = "elecbill_2017_clean_USD ln_plant_total_heatoutput size D_small_scale D_large_scale pm_cnsnt_stcks D_textiles  grossrev_17_18_clean_USD"

. local cov_interest_B = "bh_total_workers bh_total_capex_USD bh_ope_cost_USD D_cyc D_bf D_scr D_esp"

. local cov_interest_C = "pm_mass_etsbl pm_conc_etsbl mean_ring_premock above_standard"

. 
. label var grossrev_17_18_clean_USD "Gross Sales Revenue in 2017 (1,000 USD)"

. label var elecbill_2017_clean_USD "Total electricity cost (1,000 USD)"

. label var ln_plant_total_heatoutput "Log(plant total heat output)"

. label var size "Size as recorded on environment consent (1 to 3)"

. label var D_small_scale "Small-scale (size=1)"

. label var D_large_scale "Large-scale (size=3)"

. label var pm_cnsnt_stcks "Number of stacks"

. label var D_textiles "Textiles sector (=1)"

. label var bh_total_workers "Boiler house employment"

. label var bh_total_capex_USD "Boiler house capital expenditure (1,000 USD)"

. label var bh_ope_cost_USD "Boiler house operating cost (1,000 USD)"

. label var D_cyc "APCD: Cyclone present"

. label var D_bf "APCD: Bag ﬁlter present"

. label var D_scr "APCD: Scrubber present"

. label var D_esp "APCD: ESP present"

. label var pm_mass_etsbl "Plant total PM mass rate (kg/hr)"

. label var pm_conc_etsbl "Plant mean PM concentration (mg/Nm\textsuperscript{3})"

. label var mean_ring_premock "Plant mean Ringelmann score (1 to 5)"

. label var above_standard "Above regulatory standard at ETS baseline (=1)"

. 
. di "Data for Table A2: Distribution of number of stacks by plant"
Data for Table A2: Distribution of number of stacks by plant

. tab pm_cnsnt_stcks

  Number of |
     stacks |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        289       95.07       95.07
          2 |         12        3.95       99.01
          3 |          1        0.33       99.34
          4 |          2        0.66      100.00
------------+-----------------------------------
      Total |        304      100.00

. tab pm_cnsnt_stcks if D_treatment == 1

  Number of |
     stacks |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        149       94.90       94.90
          2 |          5        3.18       98.09
          3 |          1        0.64       98.73
          4 |          2        1.27      100.00
------------+-----------------------------------
      Total |        157      100.00

. tab pm_cnsnt_stcks if D_treatment == 0

  Number of |
     stacks |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        140       95.24       95.24
          2 |          7        4.76      100.00
------------+-----------------------------------
      Total |        147      100.00

. 
. ********************************************************************************
. ********************** [2] BALANCE CHECK (ANALYSIS SAMPLE) *********************
. ********************************************************************************
. 
. merge 1:m gpcb_id using "$IMPUTATION_DATA_OUT/PlantMonthPMMassRule0.dta",

    Result                      Number of obs
    -----------------------------------------
    Not matched                            26
        from master                        26  (_merge==1)
        from using                          0  (_merge==2)

    Matched                             7,008  (_merge==3)
    -----------------------------------------

. keep if _merge == 3
(26 observations deleted)

. bysort industry_id: gen dump=_n

. bysort industry_id: keep if _n==_N
(6,716 observations deleted)

. 
. diffTest3 `cov_interest_A', by(D_high_report)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     124    344.1002    36.09537    401.9411    272.6516    415.5488
       1 |     145    466.5323    69.23427     833.691    329.6855     603.379
---------+--------------------------------------------------------------------
Combined |     269    410.0952    40.96151    671.8187    329.4479    490.7425
---------+--------------------------------------------------------------------
    diff |           -122.4321    81.98587               -283.8531    38.98899
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.4933
H0: diff = 0                                     Degrees of freedom =      267

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0683         Pr(|T| > |t|) = 0.1365          Pr(T > t) = 0.9317

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     133    15.57019     .041977    .4841028    15.48716    15.65323
       1 |     159    15.61216    .0495202    .6244254    15.51435    15.70997
---------+--------------------------------------------------------------------
Combined |     292    15.59304    .0330238    .5643102    15.52805    15.65804
---------+--------------------------------------------------------------------
    diff |           -.0419673    .0663794               -.1726138    .0886791
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.6322
H0: diff = 0                                     Degrees of freedom =      290

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2639         Pr(|T| > |t|) = 0.5277          Pr(T > t) = 0.7361

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128      1.3125    .0517294    .5852518    1.210137    1.414863
       1 |     157    1.414013    .0527263     .660658    1.309863    1.518162
---------+--------------------------------------------------------------------
Combined |     285    1.368421    .0372511    .6288705    1.295098    1.441744
---------+--------------------------------------------------------------------
    diff |           -.1015127      .07478               -.2487083    .0456829
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.3575
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0879         Pr(|T| > |t|) = 0.1757          Pr(T > t) = 0.9121

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128         .75    .0384237    .4347141    .6739665    .8260335
       1 |     157    .6815287    .0373005    .4673742    .6078494    .7552079
---------+--------------------------------------------------------------------
Combined |     285    .7122807    .0268628    .4534959    .6594053    .7651561
---------+--------------------------------------------------------------------
    diff |            .0684713    .0539479               -.0377187    .1746614
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   1.2692
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.8973         Pr(|T| > |t|) = 0.2054          Pr(T > t) = 0.1027

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128       .0625    .0214795    .2430126     .019996     .105004
       1 |     157    .0955414    .0235357     .294902    .0490515    .1420313
---------+--------------------------------------------------------------------
Combined |     285    .0807018    .0161626    .2728557    .0488881    .1125154
---------+--------------------------------------------------------------------
    diff |           -.0330414    .0324919               -.0969978     .030915
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.0169
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1550         Pr(|T| > |t|) = 0.3101          Pr(T > t) = 0.8450

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128    1.046875    .0187562    .2122016     1.00976     1.08399
       1 |     157    1.076433    .0320019    .4009828     1.01322    1.139646
---------+--------------------------------------------------------------------
Combined |     285    1.063158    .0195271     .329656    1.024722    1.101594
---------+--------------------------------------------------------------------
    diff |           -.0295581    .0392881                -.106892    .0477758
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.7523
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2262         Pr(|T| > |t|) = 0.4525          Pr(T > t) = 0.7738

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128        .875    .0293466    .3320184    .8169285    .9330715
       1 |     157    .8471338    .0288117    .3610101    .7902223    .9040452
---------+--------------------------------------------------------------------
Combined |     285    .8596491    .0206115    .3479617    .8190785    .9002198
---------+--------------------------------------------------------------------
    diff |            .0278662    .0414781               -.0537785     .109511
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.6718
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.7489         Pr(|T| > |t|) = 0.5022          Pr(T > t) = 0.2511

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     122    6950.014    1187.041     13111.3    4599.953    9300.075
       1 |     151    15125.83    4452.696    54715.65    6327.728    23923.94
---------+--------------------------------------------------------------------
Combined |     273    11472.17    2527.541    41761.82    6496.141     16448.2
---------+--------------------------------------------------------------------
    diff |            -8175.82    5068.945               -18155.34    1803.697
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.6129
H0: diff = 0                                     Degrees of freedom =      271

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0540         Pr(|T| > |t|) = 0.1079          Pr(T > t) = 0.9460

. esttab using "$EMISSIONS_TABS/Table_F3.tex", replace fragment ///
>         noobs nomtitles nonumbers collabels("Over Median" "Under Median" "Difference") ///
>         varwidth(32) label nogap compress booktabs width(0.75\hsize) ///
>         cells("mu_1(fmt(a2))          mu_2           d(star pvalue(d_p))" ///
>                   "sd_1(fmt(a2) par([ ])) sd_2(par([ ])) d_se(par)") ///
>         star(* 0.10 ** 0.05 *** 0.01) ///
>         prehead( ///
>                 "\begin{longtable}{lccc}" ///
>                 "\caption{Balance of plant characteristics by whether report more than median reporting}" ///
>                 "\label{tab:balanceDA} \\" ///
>                 "\toprule") ///
>         posthead( ///
>           "&(1)&(2)&(3)\\" ///
>                 "\midrule" ///
>                 "\addlinespace" ///
>                 "\multicolumn{4}{c}{\textit{Panel A: Plant Measures}} \\" ) ///
>         postfoot("\addlinespace\addlinespace")
(file 03Output/tables/Table_F3.tex not found)
(output written to 03Output/tables/Table_F3.tex)

. 
. diffTest3 `cov_interest_B', by(D_high_report)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128    32.66406    2.649104    29.97119    27.42196    37.90616
       1 |     157    36.44586    2.583355    32.36934    31.34299    41.54873
---------+--------------------------------------------------------------------
Combined |     285    34.74737    1.855084    31.31742    31.09591    38.39883
---------+--------------------------------------------------------------------
    diff |           -3.781797     3.72934               -11.12256    3.558968
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.0141
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1557         Pr(|T| > |t|) = 0.3114          Pr(T > t) = 0.8443

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     118    149.6301    16.08384    174.7152    117.7769    181.4833
       1 |     149    215.8199    33.06799    403.6463    150.4735    281.1663
---------+--------------------------------------------------------------------
Combined |     267    186.5675    19.84624    324.2902    147.4918    225.6432
---------+--------------------------------------------------------------------
    diff |           -66.18984    39.83108               -144.6155    12.23581
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.6618
H0: diff = 0                                     Degrees of freedom =      265

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0489         Pr(|T| > |t|) = 0.0977          Pr(T > t) = 0.9511

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128    108.1332    7.419294    83.93973     93.4518    122.8147
       1 |     157    142.7909    16.16446    202.5401    110.8614    174.7203
---------+--------------------------------------------------------------------
Combined |     285    127.2253    9.548123    161.1909    108.4313    146.0194
---------+--------------------------------------------------------------------
    diff |           -34.65763    19.11909                -72.2913    2.976045
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.8127
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0355         Pr(|T| > |t|) = 0.0709          Pr(T > t) = 0.9645

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128      .96875    .0154393    .1746763    .9381983    .9993017
       1 |     157    .9808917    .0109612    .1373437    .9592402    1.002543
---------+--------------------------------------------------------------------
Combined |     285    .9754386    .0091848    .1550564    .9573598    .9935174
---------+--------------------------------------------------------------------
    diff |           -.0121417    .0184839                -.048525    .0242416
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.6569
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2559         Pr(|T| > |t|) = 0.5118          Pr(T > t) = 0.7441

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128     .859375    .0308476    .3490003    .7983333    .9204167
       1 |     157    .8216561    .0306487     .384027    .7611161     .882196
---------+--------------------------------------------------------------------
Combined |     285    .8385965     .021831    .3685499    .7956254    .8815676
---------+--------------------------------------------------------------------
    diff |            .0377189    .0439101               -.0487129    .1241508
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.8590
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.8045         Pr(|T| > |t|) = 0.3911          Pr(T > t) = 0.1955

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128    .6171875     .043132    .4879831     .531837     .702538
       1 |     157    .6369427    .0385013      .48242    .5608915    .7129938
---------+--------------------------------------------------------------------
Combined |     285    .6280702    .0286798      .48417    .5716183     .684522
---------+--------------------------------------------------------------------
    diff |           -.0197552    .0577486               -.1334265    .0939162
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.3421
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.3663         Pr(|T| > |t|) = 0.7325          Pr(T > t) = 0.6337

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     128    .0703125    .0226873    .2566776    .0254184    .1152066
       1 |     157    .1210191    .0261129    .3271932    .0694387    .1725995
---------+--------------------------------------------------------------------
Combined |     285    .0982456    .0176621      .29817    .0634804    .1330108
---------+--------------------------------------------------------------------
    diff |           -.0507066    .0354432               -.1204723    .0190591
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.4306
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0768         Pr(|T| > |t|) = 0.1536          Pr(T > t) = 0.9232

. esttab using "$EMISSIONS_TABS/Table_F3.tex", append fragment ///
>         noobs nomtitles nonumbers collabels(none) ///
>         varwidth(32) label nogap booktabs width(0.75\hsize) eqlabel(none) ///
>         cells("mu_1(fmt(a2))          mu_2           d(star pvalue(d_p))" ///
>                   "sd_1(fmt(a2) par([ ])) sd_2(par([ ])) d_se(par)") ///
>         star(* 0.10 ** 0.05 *** 0.01) ///
>         prehead("\multicolumn{4}{c}{\textit{Panel B: Plant Abatement and Investment Cost}} \\") ///
>         posthead("") ///
>         prefoot("") ///
>         postfoot("\addlinespace\addlinespace")
(output written to 03Output/tables/Table_F3.tex)

. 
. diffTest3 `cov_interest_C', by(D_high_report)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     129     3.49925    .3282618    3.728337    2.849728    4.148772
       1 |     156    3.700987    .3978665    4.969352    2.915047    4.486928
---------+--------------------------------------------------------------------
Combined |     285    3.609675    .2632639    4.444405    3.091479    4.127871
---------+--------------------------------------------------------------------
    diff |           -.2017378    .5297045               -1.244398    .8409229
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.3808
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.3518         Pr(|T| > |t|) = 0.7036          Pr(T > t) = 0.6482

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     129    167.8186    13.40746    152.2795    141.2897    194.3476
       1 |     156    179.5015    12.34365    154.1722     155.118     203.885
---------+--------------------------------------------------------------------
Combined |     285    174.2135    9.072396    153.1597    156.3558    192.0712
---------+--------------------------------------------------------------------
    diff |            -11.6829    18.24573               -47.59746    24.23167
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.6403
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2612         Pr(|T| > |t|) = 0.5225          Pr(T > t) = 0.7388

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     131    1.407697    .0362249    .4146128    1.336031    1.479364
       1 |     158     1.32212    .0306352    .3850787    1.261609     1.38263
---------+--------------------------------------------------------------------
Combined |     289    1.360911     .023548     .400316    1.314563    1.407259
---------+--------------------------------------------------------------------
    diff |            .0855775    .0471152               -.0071576    .1783127
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   1.8163
H0: diff = 0                                     Degrees of freedom =      287

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9648         Pr(|T| > |t|) = 0.0704          Pr(T > t) = 0.0352

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     129     .255814    .0385654    .4380188    .1795057    .3321222
       1 |     156    .3589744    .0385304    .4812446    .2828619    .4350868
---------+--------------------------------------------------------------------
Combined |     285    .3122807    .0274991    .4642388    .2581527    .3664087
---------+--------------------------------------------------------------------
    diff |           -.1031604    .0550035               -.2114283    .0051075
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.8755
H0: diff = 0                                     Degrees of freedom =      283

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0309         Pr(|T| > |t|) = 0.0618          Pr(T > t) = 0.9691

. esttab using "$EMISSIONS_TABS/Table_F3.tex", append fragment ///
>         noobs nomtitles nonumbers collabels(none) ///
>         varwidth(32) label  nogap booktabs width(0.75\hsize) eqlabel(none) ///
>         cells("mu_1(fmt(a2))          mu_2           d(star pvalue(d_p))" ///
>                   "sd_1(fmt(a2) par([ ])) sd_2(par([ ])) d_se(par)") ///
>         star(* 0.10 ** 0.05 *** 0.01) ///
>         prehead("\multicolumn{4}{c}{\textit{Panel C: Plant Pollution Measures}} \\") ///
>         posthead("") ///
>         prefoot("\addlinespace\addlinespace") ///
>         postfoot( ///
>                 "Number of plants & 156 & 136 & \\" ///
>                 "\bottomrule\\[-5.2ex]" ///
>                 "\insertTableNotes" ///
>                 "\end{longtable}" )
(output written to 03Output/tables/Table_F3.tex)

. 
end of do-file

. 
. * Figure B1
. * Plot ETS baseline emissions distribution
. do "$CODE_DIR/plot_emissions_distribution.do" 

. /*******************************************************************************
>            Purpose: Plot ETS Baseline PM Concentration
>    ****************************************************************************/
. 
. set more off

. clear matrix

. clear all

. pause on

. 
. use "$BASELINE_DATA_OUT/BaselineCovariates.dta", clear
('IN-SAMPLE' ETS MASTER. 318 INDS. +TREATMENT)

. 
. label define newlabel 0 "Control" 1 "Treatment", modify

. label val D_treatment newlabel

. 
. // Show relative frequencies of over regulatory level
. gen over_sq_reg_ind = pm_conc_etsbl>150

. tabulate over_sq_reg_ind D_treatment, co

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |     1=Treatment,
over_sq_re |       0=Control
     g_ind |   Control  Treatment |     Total
-----------+----------------------+----------
         0 |       106        105 |       211 
           |     67.95      64.81 |     66.35 
-----------+----------------------+----------
         1 |        50         57 |       107 
           |     32.05      35.19 |     33.65 
-----------+----------------------+----------
     Total |       156        162 |       318 
           |    100.00     100.00 |    100.00 

. 
. centile pm_conc_etsbl, c(95)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
pm_conc_et~l |       304         95      520.65        385.8568    716.0578

. local high = r(c_1)

. di `high'
520.65

. replace pm_conc_etsbl = . if pm_conc_etsbl > `high'
(15 real changes made, 15 to missing)

. sum pm_conc_etsbl

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
pm_conc_et~l |        289     145.131    84.00762       3.28      510.6

. 
. // Show relative frequencies of over regulatory level
. replace over_sq_reg_ind = . if pm_conc_etsbl==.
(29 real changes made, 29 to missing)

. tabulate over_sq_reg_ind D_treatment, co

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

           |     1=Treatment,
over_sq_re |       0=Control
     g_ind |   Control  Treatment |     Total
-----------+----------------------+----------
         0 |       106        105 |       211 
           |     74.65      71.43 |     73.01 
-----------+----------------------+----------
         1 |        36         42 |        78 
           |     25.35      28.57 |     26.99 
-----------+----------------------+----------
     Total |       142        147 |       289 
           |    100.00     100.00 |    100.00 

. 
. hist pm_conc_etsbl, by(D_treatment, note("") legend(off) ///
>         graphregion(color(white)) plotregion(color(white)) bgcolor(white)) /// 
>         subtitle(,bcolor(white)) ///
>         addplot(pci 0 150 0.015 150) color(midblue*0.6) lcolor(midblue) /// 
>         width(30) start(0) xscale(range(0 500)) ///
>         text(0.015 175 "150 mg/Nm{superscript:3}", orientation(vertical) place(sw) size(medsmall) color(red)) ///
>         xlab(,labsize(medlarge)) ylab(,labsize(medlarge)) ///
>         xsize(10) ysize(5)

. graph export "$EMISSIONS_FIGS/Figure_B1.pdf", replace
file 03Output/figures/Figure_B1.pdf saved as PDF format

. 
end of do-file

. 
. * Figure 5, Figure C2 and Figure C3
. * Plot CEMS data availability and emissions time series
. do "$CODE_DIR/plot_emissions_time_series.do" 

. /*******************************************************************************
>            Authors: Kaixin Wang
>            Project: ETS
>            Purpose: Plot time series of CEMS data availability and PM emissions
> 
>            Date created: 18 February 2022
>            Version:      STATA 17 MP
>            
>            Last edited: 2 June 2022
>            Edited by:   Kaixin          
>    ****************************************************************************/
. 
. set more off 

. clear matrix

. clear all

. pause on

. 
. ********************************************************************************
. ************************** [1] PLOT DATA AVAILABILITY **************************
. ********************************************************************************
. 
. use "$IMPUTATION_DATA_OUT/PlantWeekPMMassNoRule.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. local n_ctrl = 136

. local n_trt = 156

. local n_tot = 292

. 
. gen D_report = 0

. replace D_report = 1 if ind_week_mass_val_rule0 != .
(19,454 real changes made)

. bysort week treatmentstatus: egen weekly_pct_report = mean(100 * D_report)

. bysort week treatmentstatus: egen weekly_mean_PM = mean(ind_week_mass_val_rule0)

. keep week treatmentstatus weekly_pct_report weekly_mean_PM

. duplicates drop

Duplicates in terms of all variables

(29,870 observations deleted)

. gen week_new = td(31dec2018) + (week - 1) * 7

. format week_new %tddd-Mon-YY

. gen week_plot = week_new + 3

. format week_plot %tddd-Mon-YY

. 
. local xtext_pos = 0

. local x_opt xtick(21655 21685 21716 21746 21777 21808 21838 21869 21899 21930 21961 21990 22021 22051 22082 22112 22143 22174 22204 22235 22265 22296 22327 22355 22386) ///
>         xlabel(21655 21746 21838 21930 22021 22112 22204 22296 22386, angle(35) labsize(medsmall)) ///
>         xline(21745, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 21746 "Mock-I", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(21774, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 21775 "Mock-II", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(21808, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 21809 "Period-I", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(21823, lwidth(8.2) lcolor(gs14%30) lpattern(solid)) ///
>         xline(21838, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 21839 "Period-II", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(21853.5, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>         xline(21869, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 21870 "Period-III", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(21892, lwidth(12.5) lcolor(gs14%30) lpattern(solid)) ///
>         xline(21915, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 21916 "Period-IV", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(21930.5, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>         xline(21946, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 21947 "Period-V", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(21960.5, lwidth(7.8) lcolor(gs14%30) lpattern(solid)) ///
>         xline(21975, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 21976 "Period-VI", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(21985.5, lwidth(5.5) lcolor(gs14%30) lpattern(solid)) ///
>         xline(21996, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 21997 "Interregnum", place(ne) orientation(vertical) size(small) color(edkblue%70)) ///
>         xline(22098, lwidth(55.5) lcolor(ebg%50) lpattern(solid)) ///
>         xline(22200, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 22201 "Mock-III", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(22231, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 22232 "Interregnum", place(ne) orientation(vertical) size(small) color(edkblue%70)) ///
>         xline(22240.5, lwidth(5) lcolor(ebg%50) lpattern(solid)) ///
>         xline(22250, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 22251 "Period-VII", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(22265.5, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>         xline(22281, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 22282 "Period-VIII", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(22296.5, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>         xline(22312, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 22313 "Period-IX", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(22326, lwidth(7.5) lcolor(gs14%30) lpattern(solid)) ///
>         xline(22340, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>         text(`xtext_pos' 22341 "Period-X", place(ne) orientation(vertical) size(small) color(gs8)) ///
>         xline(22355.5, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>         xline(22371, lwidth(vthin) lcolor(black) lpattern(tight_dot))   

. 
. twoway ///
>         connect weekly_pct_report week_plot if treatmentstatus == "Treatment", ///
>         clwidth(vthin) clcolor(midblue) mcolor(midblue) msymbol(T) msize(vsmall) || ///
>         connect weekly_pct_report week_plot if treatmentstatus == "Control", ///
>         clwidth(vthin) clcolor(gs6) mcolor(gs6) msize(vsmall) lpattern(shortdash) ///
>         plotregion(color(white)) bgcolor(white) graphregion(color(white)) ///
>         xtitle("") ///
>         ytitle("Plants reporting (%)", size(medsmall) axis(1)) ///
>         ylabel(0(20)100, labsize(medsmall) angle(horizontal) axis(1)) ///
>         `x_opt' ///
>         legend(cols(1) size(medsmall) region(lstyle(none)) position(6)) ///
>         legend(on order(1 "Treatment (n=`n_trt')" 2 "Control (n=`n_ctrl')")) ///
>         xsize(9) ysize(4)

. 
. graph export "$EMISSIONS_FIGS/Figure_C2.pdf", replace
file 03Output/figures/Figure_C2.pdf saved as PDF format

. 
. 
. ********************************************************************************
. ************************** [2] PLOT WEEKLY EMISSION ****************************
. ********************************************************************************
. 
. local RuleNo 0 A B

. 
. foreach r of local RuleNo {
  2.         
.         use "$IMPUTATION_DATA_OUT/PlantWeekPMMassRule`r'.dta", clear
  3. 
.         gen D_report = 0
  4.         replace D_report = 1 if ind_week_mass_val_rule0 != .
  5.         bysort week treatmentstatus: egen weekly_pct_report = mean(100 * D_report)
  6.         bysort week treatmentstatus: egen weekly_mean_PM = mean(ind_week_mass_val_rule0)
  7.         keep week treatmentstatus weekly_pct_report weekly_mean_PM
  8.         duplicates drop
  9. 
.         gen week_new = td(31dec2018) + (week - 1) * 7
 10.         format week_new %tddd-Mon-YY
 11.         gen week_plot = week_new + 3
 12.         format week_plot %tddd-Mon-YY
 13. 
.         gen weekly_mean_PM_prorated = weekly_mean_PM / 7 * 30
 14. 
.         ** Plot WEEKLY Mean PM Mass by Treatment Status (NO IMPUTATION)
. 
.         local xtext_pos = 0
 15.         local x_opt xtick(21655 21685 21716 21746 21777 21808 21838 21869 21899 21930 21961 21990 22021 22051 22082 22112 22143 22174 22204 22235 22265 22296 22327 22355 22386) ///
>                 xlabel(21655 21746 21838 21930 22021 22112 22204 22296 22386, angle(35) labsize(medsmall)) ///
>                 xline(21745, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 21746 "Mock-I", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(21774, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 21775 "Mock-II", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(21808, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 21809 "Period-I", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(21823, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>                 xline(21838, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 21839 "Period-II", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(21853.5, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>                 xline(21869, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 21870 "Period-III", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(21892, lwidth(12) lcolor(gs14%30) lpattern(solid)) ///
>                 xline(21915, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 21916 "Period-IV", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(21930.5, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>                 xline(21946, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 21947 "Period-V", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(21960.5, lwidth(7.8) lcolor(gs14%30) lpattern(solid)) ///
>                 xline(21975, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 21976 "Period-VI", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(21985.5, lwidth(5.4) lcolor(gs14%30) lpattern(solid)) ///
>                 xline(21996, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 21997 "Interregnum", place(ne) orientation(vertical) size(small) color(edkblue%70)) ///
>                 xline(22098, lwidth(55) lcolor(ebg%50) lpattern(solid)) ///
>                 xline(22200, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 22201 "Mock-III", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(22231, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 22232 "Interregnum", place(ne) orientation(vertical) size(small) color(edkblue%70)) ///
>                 xline(22240.5, lwidth(5) lcolor(ebg%50) lpattern(solid)) ///
>                 xline(22250, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 22251 "Period-VII", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(22265.5, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>                 xline(22281, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 22282 "Period-VIII", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(22296.5, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>                 xline(22312, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 22313 "Period-IX", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(22326, lwidth(7) lcolor(gs14%30) lpattern(solid)) ///
>                 xline(22340, lwidth(vthin) lcolor(black) lpattern(tight_dot)) ///
>                 text(`xtext_pos' 22341 "Period-X", place(ne) orientation(vertical) size(small) color(gs8)) ///
>                 xline(22355.5, lwidth(8) lcolor(gs14%30) lpattern(solid)) ///
>                 xline(22371, lwidth(vthin) lcolor(black) lpattern(tight_dot)) 
 16. 
.         twoway ///
>                 connect weekly_mean_PM_prorated week_plot if treatmentstatus == "Treatment" & week_new < date("2020mar23", "YMD"), ///
>                 clwidth(vthin) clcolor(midblue) mcolor(midblue) msymbol(T) msize(vsmall)|| ///
>                 connect weekly_mean_PM_prorated week_plot if treatmentstatus == "Treatment" & week_new > date("2020oct5", "YMD") & week_new < date("2020nov9", "YMD"), ///
>                 clwidth(vthin) clcolor(midblue) mcolor(midblue) msymbol(T) msize(vsmall) || ///
>                 connect weekly_mean_PM_prorated week_plot if treatmentstatus == "Treatment" & week_new > date("2020nov30", "YMD"), ///
>                 clwidth(vthin) clcolor(midblue) mcolor(midblue) msymbol(T) msize(vsmall) || ///
>                 connect weekly_mean_PM_prorated week_plot if treatmentstatus == "Control" & week_new < date("2020mar23", "YMD"), ///
>                 clwidth(vthin) clcolor(gs6) mcolor(gs6) msymbol(o) msize(vsmall) lpattern(shortdash) || ///
>                 connect weekly_mean_PM_prorated week_plot if treatmentstatus == "Control" & week_new > date("2020oct5", "YMD") & week_new < date("2020nov9", "YMD"), ///
>                 clwidth(vthin) clcolor(gs6) mcolor(gs6) msymbol(o) msize(vsmall) lpattern(shortdash) || ///
>                 connect weekly_mean_PM_prorated week_plot if treatmentstatus == "Control" & week_new > date("2020nov30", "YMD"), ///
>                 clwidth(vthin) clcolor(gs6) mcolor(gs6) msymbol(o) msize(vsmall) lpattern(shortdash) || ///
>                 pci 1728 21745 1728 21837, lcolor(red) lwidth(vthin) || ///
>                 pci 1235 21837 1235 21868, lcolor(red) lwidth(vthin) || ///
>                 pci 1111 21868 1111 21914, lcolor(red) lwidth(vthin) || ///
>                 pci 1049 21914 1049 21995, lcolor(red) lwidth(vthin) || ///
>                 pci 1049 22200 1049 22230, lcolor(red) lwidth(vthin) || ///
>                 pci 1049 22250 1049 22371, lcolor(red) lwidth(vthin) ///
>                 plotregion(color(white)) bgcolor(white) graphregion(color(white)) ///
>                 xtitle("") ///
>                 ytitle("Mean PM mass (kg/month)", size(medsmall) axis(1)) ///
>                 ylabel(0(500)3000, labsize(medsmall) angle(horizontal)) ///
>                 `x_opt' ///
>                 text(1658 21745 "1728 kg", place(ne) size(tiny) color(red)) ///
>                 text(1265 21837 "1235 kg", place(ne) size(tiny) color(red)) ///
>                 text(1041 21868 "1111 kg", place(ne) size(tiny) color(red)) ///
>                 text(979 21914 "1049 kg", place(ne) size(tiny) color(red)) ///
>                 text(979 22200 "1049 kg", place(ne) size(tiny) color(red)) ///
>                 text(979 22250 "1049 kg", place(ne) size(tiny) color(red)) ///
>                 legend(cols(1) size(medsmall) region(lstyle(none)) position(6)) ///
>                 legend(on order(4 "Control (n=`n_ctrl')" 1 "Treatment (n=`n_trt')")) ///
>                 xsize(9) ysize(4) 
 17. 
.                 if "`r'" == "0" local figure_name = "Figure_5.pdf" 
 18.                 if "`r'" == "A" local figure_name = "Figure_C3_A.pdf" 
 19.                 if "`r'" == "B" local figure_name = "Figure_C3_B.pdf" 
 20.                 
.         graph export "$EMISSIONS_FIGS/`figure_name'", replace
 21. }
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)
(21,836 real changes made)

Duplicates in terms of all variables

(29,870 observations deleted)
file 03Output/figures/Figure_5.pdf saved as PDF format
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)
(22,890 real changes made)

Duplicates in terms of all variables

(29,870 observations deleted)
file 03Output/figures/Figure_C3_A.pdf saved as PDF format
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)
(30,076 real changes made)

Duplicates in terms of all variables

(29,870 observations deleted)
file 03Output/figures/Figure_C3_B.pdf saved as PDF format

. 
end of do-file

. 
. * Table 3 and Table F5
. * Make regression table of treatment effect on PM
. do "$CODE_DIR/make_regression_table.do"

. /*******************************************************************************
> Purpose: Create the main regression table
> ****************************************************************************/
. 
. set more off 

. clear matrix

. clear all

. pause on

. 
. local yvar "lnY_rule0"

. 
. ** Construct monthly DA for use in DA regression versions
. use "$EMISSIONS_DATA_IN/CEMS_2018-12-31 to 2021-04-03_StackDay_Balanced_HistCFs_Master337s_3sample2trunc.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. collapse stack_DA_day, by(gpcb_id month16)

. replace stack_DA_day = 0 if missing(stack_DA_day)
(0 real changes made)

. tempfile month_ind_da

. save `month_ind_da'
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000001 saved as .dta format

. 
. foreach include_DA_cov in 0 1 {
  2.         local table_name Table_3
  3.         local cov_interest "ln_capex D_ln_capex_missing boi_year D_boi_year_missing bh_ope_cost D_bh_ope_cost_missing ln_plant_total_heatoutput"
  4.         use "$EMISSIONS_DATA_OUT/Rule0_Panel.dta", clear
  5.         keep if D_interregnum == 0
  6.         keep if post_mock1 == 1 | post_mock2 == 1
  7.         sum `yvar' if D_treatment == 1
  8. 
.         if `include_DA_cov' == 1 {
  9.                 local table_name Table_F5
 10.                 local cov_interest "`cov_interest' stack_DA_day"
 11.                 merge 1:1 gpcb_id month16 using `month_ind_da'
 12.                 keep if _merge!=2
 13.                 drop _merge
 14.                 }
 15. 
. ********************************************************************************
. **************************** Panel 0 - Unweighted ******************************
. ********************************************************************************
. *use "$EMISSIONS_DATA_OUT/Rule0_Panel.dta", clear
. *keep if D_interregnum == 0
. *keep if post_mock1 == 1 | post_mock2 == 1
. 
. ** Column 1: treatment dummy & plant covariates
.         eststo reg_1: reg `yvar' 1.D_treatment `cov_interest', clus(gpcb_id)
 16.         estadd local Month_FE ""
 17.         estadd local Reweighted ""
 18.         estadd local Imp_Rule ""
 19.         estadd local N_Plants = e(N_clust)
 20.         sum `yvar' if D_treatment == 0
 21.         estadd local Ctrl_Mean = string(r(mean), "%15.2f")
 22.         estadd local space ""
 23. 
. ** Column 2: treatment dummy & plant covariates & month FE
.         eststo reg_2: reghdfe `yvar' 1.D_treatment `cov_interest', a(i.month16) clus(gpcb_id)
 24.         estadd local Month_FE "Yes"
 25.         estadd local Reweighted ""
 26.         estadd local Imp_Rule ""
 27.         estadd local N_Plants = e(N_clust)
 28.         sum `yvar' if D_treatment == 0
 29.         estadd local Ctrl_Mean = string(r(mean), "%15.2f")
 30.         estadd local space ""
 31. 
. ********************************************************************************
. **************************** Panel 0 - Reweighted ******************************
. ********************************************************************************
. 
. ** Column 3: treatment dummy & plant covariates
.         eststo reg_3: reg `yvar' 1.D_treatment `cov_interest' [pw=newweight_normalized], clus(gpcb_id)
 32.         estadd local Month_FE ""
 33.         estadd local Reweighted "Yes"
 34.         estadd local Imp_Rule ""
 35.         estadd local N_Plants = e(N_clust)
 36.         sum `yvar' [aw=newweight_normalized] if D_treatment == 0
 37.         estadd local Ctrl_Mean = string(r(mean), "%15.2f")
 38.         estadd local space ""
 39. 
. ** Column 4: treatment dummy & plant covariates & month FE
.         eststo reg_4: reghdfe `yvar' 1.D_treatment `cov_interest' [pw=newweight_normalized], a(i.month16) clus(gpcb_id)
 40.         estadd local Month_FE "Yes"
 41.         estadd local Reweighted "Yes"
 42.         estadd local Imp_Rule ""
 43.         estadd local N_Plants = e(N_clust)
 44.         sum `yvar' [aw=newweight_normalized] if D_treatment == 0
 45.         estadd local Ctrl_Mean = string(r(mean), "%15.2f")
 46.         estadd local space ""
 47. 
. ********************************************************************************
. *********************************** Panel A ************************************
. ********************************************************************************
. 
.         use "$EMISSIONS_DATA_OUT/RuleA_Panel.dta", clear
 48.         keep if D_interregnum == 0
 49.         keep if post_mock1 == 1 | post_mock2 == 1
 50.         sum `yvar' if D_treatment == 1
 51.         if `include_DA_cov' == 1 {
 52.                 merge 1:1 gpcb_id month16 using `month_ind_da'
 53.                 keep if _merge!=2
 54.                 drop _merge
 55.                 }
 56.                 
.         preserve
 57.         rename `yvar' `yvar'_RuleA
 58.         tempfile RuleA_Panel
 59.         save `RuleA_Panel'
 60.         restore
 61. 
. ** Column 5: treatment dummy & plant covariates
.         eststo reg_5: reg `yvar' 1.D_treatment `cov_interest', clus(gpcb_id)
 62.         estadd local Month_FE ""
 63.         estadd local Reweighted ""
 64.         estadd local Imp_Rule "Rule A"
 65.         estadd local N_Plants = e(N_clust)
 66.         sum `yvar' if D_treatment == 0
 67.         estadd local Ctrl_Mean = string(r(mean), "%15.2f")
 68.         estadd local space ""
 69. 
. ** Column 6: treatment dummy & plant covariates & month FE
.         eststo reg_6: reghdfe `yvar' 1.D_treatment `cov_interest', a(i.month16) clus(gpcb_id)
 70.         estadd local Month_FE "Yes"
 71.         estadd local Reweighted ""
 72.         estadd local Imp_Rule "Rule A"
 73.         estadd local N_Plants = e(N_clust)
 74.         sum `yvar' if D_treatment == 0
 75.         estadd local Ctrl_Mean = string(r(mean), "%15.2f")
 76.         estadd local space ""
 77. 
. ********************************************************************************
. *********************************** Panel B ************************************
. ********************************************************************************
. 
.         use "$EMISSIONS_DATA_OUT/RuleB_Panel.dta", clear
 78.         keep if D_interregnum == 0
 79.         keep if post_mock1 == 1 | post_mock2 == 1
 80.         sum `yvar' if D_treatment == 1
 81.         if `include_DA_cov' == 1 {
 82.                 merge 1:1 gpcb_id month16 using `month_ind_da'
 83.                 keep if _merge!=2
 84.                 drop _merge
 85.                 }
 86. 
. ** Column 7: treatment dummy & plant covariates
.         eststo reg_7: reg `yvar' 1.D_treatment `cov_interest', clus(gpcb_id)
 87.         estadd local Month_FE ""
 88.         estadd local Reweighted ""
 89.         estadd local Imp_Rule "Rule B"
 90.         estadd local N_Plants = e(N_clust)
 91.         sum `yvar' if D_treatment == 0
 92.         estadd local Ctrl_Mean = string(r(mean), "%15.2f")
 93.         estadd local space ""
 94. 
. ** Column 8: treatment dummy & plant covariates & month FE
.         eststo reg_8: reghdfe `yvar' 1.D_treatment `cov_interest', a(i.month16) clus(gpcb_id)
 95.         estadd local Month_FE "Yes"
 96.         estadd local Reweighted ""
 97.         estadd local Imp_Rule "Rule B"
 98.         estadd local N_Plants = e(N_clust)
 99.         sum `yvar' if D_treatment == 0
100.         estadd local Ctrl_Mean = string(r(mean), "%15.2f")
101.         estadd local space ""
102.         
. ********************************************************************************
. ************************************ Output ************************************
. ********************************************************************************
. 
.         if `include_DA_cov' == 1 {
103. 
.         esttab reg_* ///
>           using "$EMISSIONS_TABS/`table_name'.tex", replace ///
>           se(3) ar2 booktabs varwidth(32) ///
>           keep(1.D_treatment stack_DA_day) coeflabel(1.D_treatment "ETS Treatment (=1)" stack_DA_day "Share of Day Reporting") ///
>           mgroups("\shortstack{No Imputed Months}" "\shortstack{Imputed Months}", pattern(1 0 0 0 1 0 0 0) ///
>                   prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
>           nomtitles ///
>           stats(Month_FE space Imp_Rule Reweighted Ctrl_Mean r2 N_Plants N, ///
>                   label("Year-Month FE" " " "Imputation rule" "Reweighted" "Mean dep. var (control)" "R\textsuperscript{2}" "Plants" "Observations" ) ///
>                   fmt(%1s %1s %1s %1s %9.2f %9.2f 0 0)) ///
>           prefoot(" ") ///
>           star(* 0.10 ** 0.05 *** 0.01) nonotes
104.           
.           /*
>           esttab reg_* MOC_* ///
>           using "$EMISSIONS_TABS/MOC_`table_name'.tex", replace ///
>           se(3) ar2 booktabs varwidth(32) ///
>           keep(1.D_treatment stack_DA_day) coeflabel(1.D_treatment "ETS Treatment (=1)" stack_DA_day "Share of Day Reporting") ///
>           mgroups("\shortstack{No Imputed Months}" "\shortstack{Imputed Months}", pattern(1 0 0 0 1 0 0 0 0 ) ///
>                   prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
>           nomtitles ///
>           stats(Month_FE space Imp_Rule Reweighted Ctrl_Mean r2 N_Plants N, ///
>                   label("Month FE" " " "Imputation rule" "Reweighted" "Mean dep. var (control)" "R\textsuperscript{2}" "Plants" "Observations" ) ///
>                   fmt(%1s %1s %1s %1s %9.2f %9.2f 0 0)) ///
>           prefoot(" ") ///
>           star(* 0.10 ** 0.05 *** 0.01) nonotes
>           */
. 
.                 }
105.         else {
106. 
.         esttab reg_* ///
>           using "$EMISSIONS_TABS/`table_name'.tex", replace ///
>           se(3) ar2 booktabs varwidth(32) ///
>           keep(1.D_treatment) coeflabel(1.D_treatment "ETS Treatment (=1)") ///
>           mgroups("\shortstack{No Imputed Months}" "\shortstack{Imputed Months}", pattern(1 0 0 0 1 0 0 0) ///
>                   prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
>           nomtitles ///
>           stats(Month_FE space Imp_Rule Reweighted Ctrl_Mean r2 N_Plants N, ///
>                   label("Year-Month FE" " " "Imputation rule" "Reweighted" "Mean dep. var (control)" "R\textsuperscript{2}" "Plants" "Observations" ) ///
>                   fmt(%1s %1s %1s %1s %9.2f %9.2f 0 0)) ///
>           prefoot(" ") ///
>           star(* 0.10 ** 0.05 *** 0.01) nonotes
107.           
.           /*
>         esttab reg_* MOC_* ///
>           using "$EMISSIONS_TABS/MOC_`table_name'.tex", replace ///
>           se(3) ar2 booktabs varwidth(32) ///
>           keep(1.D_treatment) coeflabel(1.D_treatment "ETS Treatment (=1)") ///
>           mgroups("\shortstack{No Imputed Months}" "\shortstack{Imputed Months}", pattern(1 0 0 0 1 0 0 0 0) ///
>                   prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
>           nomtitles ///
>           stats(Month_FE space Imp_Rule Reweighted Ctrl_Mean r2 N_Plants N, ///
>                   label("Month FE" " " "Imputation rule" "Reweighted" "Mean dep. var (control)" "R\textsuperscript{2}" "Plants" "Observations" ) ///
>                   fmt(%1s %1s %1s %1s %9.2f %9.2f 0 0)) ///
>           prefoot(" ") ///
>           star(* 0.10 ** 0.05 *** 0.01) nonotes
> */
.                 }
108.                 
. 
. }
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)
(2,336 observations deleted)
(876 observations deleted)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,899    6.517455    .8309767   2.654804   10.23472

Linear regression                               Number of obs     =      3,235
                                                F(8, 291)         =      10.12
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1333
                                                Root MSE          =     .87369

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.1783567   .0763815    -2.34   0.020    -.3286868   -.0280266
                 ln_capex |  -.0242424   .0552834    -0.44   0.661    -.1330483    .0845635
       D_ln_capex_missing |  -.3860148    .288414    -1.34   0.182    -.9536566     .181627
                 boi_year |  -.0037402   .0047316    -0.79   0.430    -.0130527    .0055722
       D_boi_year_missing |  -7.274653   9.478301    -0.77   0.443    -25.92937    11.38006
              bh_ope_cost |   .0011645   .0004128     2.82   0.005     .0003521     .001977
    D_bh_ope_cost_missing |   .2406974   .2375069     1.01   0.312    -.2267517    .7081465
ln_plant_total_heatoutput |   .4829943   .0866069     5.58   0.000      .312539    .6534496
                    _cons |   6.671855   9.397064     0.71   0.478    -11.82297    25.16668
-------------------------------------------------------------------------------------------

added macro:
           e(Month_FE) : ""

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : ""

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,336     6.66665    1.064623   1.545703   9.746841

added macro:
          e(Ctrl_Mean) : "6.67"

added macro:
              e(space) : ""
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,235
Absorbing 1 HDFE group                            F(   8,    291) =      10.26
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1746
                                                  Adj R-squared   =     0.1695
                                                  Within R-sq.    =     0.1423
Number of clusters (gpcb_id) =        292         Root MSE        =     0.8542

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.1925152   .0762812    -2.52   0.012    -.3426479   -.0423824
                 ln_capex |  -.0266007   .0548811    -0.48   0.628    -.1346149    .0814135
       D_ln_capex_missing |  -.3990054   .2864768    -1.39   0.165    -.9628346    .1648238
                 boi_year |  -.0036483    .004703    -0.78   0.439    -.0129045    .0056078
       D_boi_year_missing |   -7.08528   9.420695    -0.75   0.453    -25.62662    11.45606
              bh_ope_cost |   .0012163   .0004169     2.92   0.004     .0003958    .0020368
    D_bh_ope_cost_missing |   .2695281   .2342296     1.15   0.251    -.1914708     .730527
ln_plant_total_heatoutput |   .4835721   .0860046     5.62   0.000     .3143022    .6528421
                    _cons |   6.491835   9.331965     0.70   0.487    -11.87487    24.85854
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

added macro:
           e(Month_FE) : "Yes"

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : ""

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,336     6.66665    1.064623   1.545703   9.746841

added macro:
          e(Ctrl_Mean) : "6.67"

added macro:
              e(space) : ""
(sum of wgt is 10.99111042683944)

Linear regression                               Number of obs     =      3,235
                                                F(8, 291)         =      10.34
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1355
                                                Root MSE          =      .8647

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.1772998   .0752259    -2.36   0.019    -.3253555   -.0292441
                 ln_capex |  -.0269531   .0544204    -0.50   0.621    -.1340606    .0801543
       D_ln_capex_missing |  -.3980318   .2861855    -1.39   0.165    -.9612877    .1652242
                 boi_year |  -.0036923   .0048434    -0.76   0.446    -.0132249    .0058403
       D_boi_year_missing |  -7.185125   9.703533    -0.74   0.460    -26.28313    11.91288
              bh_ope_cost |   .0011334   .0004042     2.80   0.005     .0003379    .0019289
    D_bh_ope_cost_missing |   .2517492   .2337894     1.08   0.282    -.2083833    .7118817
ln_plant_total_heatoutput |   .4856103   .0857875     5.66   0.000     .3167677    .6544529
                    _cons |   6.537994   9.627049     0.68   0.498    -12.40948    25.48547
-------------------------------------------------------------------------------------------

added macro:
           e(Month_FE) : ""

added macro:
         e(Reweighted) : "Yes"

added macro:
           e(Imp_Rule) : ""

added macro:
           e(N_Plants) : "292"

    Variable |     Obs      Weight        Mean   Std. dev.       Min        Max
-------------+-----------------------------------------------------------------
   lnY_rule0 |   1,336  4.48073035    6.655505    1.05112   1.545703   9.746841

added macro:
          e(Ctrl_Mean) : "6.66"

added macro:
              e(space) : ""
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,235
Absorbing 1 HDFE group                            F(   8,    291) =      10.45
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1727
                                                  Adj R-squared   =     0.1676
                                                  Within R-sq.    =     0.1443
Number of clusters (gpcb_id) =        292         Root MSE        =     0.8475

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.1944124   .0751073    -2.59   0.010    -.3422348     -.04659
                 ln_capex |  -.0294074   .0540637    -0.54   0.587    -.1358128    .0769981
       D_ln_capex_missing |  -.4113502   .2845726    -1.45   0.149    -.9714316    .1487313
                 boi_year |  -.0037952   .0048258    -0.79   0.432     -.013293    .0057026
       D_boi_year_missing |  -7.386892   9.667872    -0.76   0.445    -26.41471    11.64093
              bh_ope_cost |   .0011802   .0004095     2.88   0.004     .0003743    .0019862
    D_bh_ope_cost_missing |   .2784285   .2329649     1.20   0.233    -.1800812    .7369382
ln_plant_total_heatoutput |   .4876134   .0855242     5.70   0.000      .319289    .6559378
                    _cons |   6.729526   9.583934     0.70   0.483    -12.13309    25.59214
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

added macro:
           e(Month_FE) : "Yes"

added macro:
         e(Reweighted) : "Yes"

added macro:
           e(Imp_Rule) : ""

added macro:
           e(N_Plants) : "292"

    Variable |     Obs      Weight        Mean   Std. dev.       Min        Max
-------------+-----------------------------------------------------------------
   lnY_rule0 |   1,336  4.48073035    6.655505    1.05112   1.545703   9.746841

added macro:
          e(Ctrl_Mean) : "6.66"

added macro:
              e(space) : ""
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)
(2,336 observations deleted)
(876 observations deleted)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      2,028     6.54332    .7929016   2.654804   10.26545
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000003 saved as .dta format

Linear regression                               Number of obs     =      3,796
                                                F(8, 291)         =      12.31
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1810
                                                Root MSE          =     .80021

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.2821313   .0744216    -3.79   0.000    -.4286042   -.1356584
                 ln_capex |  -.0212087    .050416    -0.42   0.674     -.120435    .0780175
       D_ln_capex_missing |  -.4032268   .2658147    -1.52   0.130    -.9263898    .1199362
                 boi_year |  -.0019256    .004978    -0.39   0.699     -.011723    .0078718
       D_boi_year_missing |  -3.650655   9.977335    -0.37   0.715    -23.28754    15.98623
              bh_ope_cost |   .0010898   .0004145     2.63   0.009      .000274    .0019056
    D_bh_ope_cost_missing |   .3571372   .2299281     1.55   0.121    -.0953957      .80967
ln_plant_total_heatoutput |   .5079545   .0870688     5.83   0.000       .33659     .679319
                    _cons |   2.758618   9.992869     0.28   0.783    -16.90884    22.42608
-------------------------------------------------------------------------------------------

added macro:
           e(Month_FE) : ""

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : "Rule A"

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.795791    .9593052   2.594657   9.770634

added macro:
          e(Ctrl_Mean) : "6.80"

added macro:
              e(space) : ""
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,796
Absorbing 1 HDFE group                            F(   8,    291) =      12.27
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2163
                                                  Adj R-squared   =     0.2122
                                                  Within R-sq.    =     0.1876
Number of clusters (gpcb_id) =        292         Root MSE        =     0.7840

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.2821313   .0745398    -3.78   0.000    -.4288368   -.1354258
                 ln_capex |  -.0212087   .0504961    -0.42   0.675    -.1205926    .0781751
       D_ln_capex_missing |  -.4032268   .2662368    -1.51   0.131    -.9272207     .120767
                 boi_year |  -.0019256   .0049859    -0.39   0.700    -.0117385    .0078873
       D_boi_year_missing |  -3.650655   9.993181    -0.37   0.715    -23.31873    16.01742
              bh_ope_cost |   .0010898   .0004151     2.63   0.009     .0002727    .0019069
    D_bh_ope_cost_missing |   .3571372   .2302932     1.55   0.122    -.0961144    .8103887
ln_plant_total_heatoutput |   .5079545   .0872071     5.82   0.000     .3363178    .6795911
                    _cons |   2.758618   10.00874     0.28   0.783    -16.94008    22.45731
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

added macro:
           e(Month_FE) : "Yes"

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : "Rule A"

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.795791    .9593052   2.594657   9.770634

added macro:
          e(Ctrl_Mean) : "6.80"

added macro:
              e(space) : ""
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)
(2,336 observations deleted)
(876 observations deleted)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      2,028    6.586923    .7810047   2.654804   10.24236

Linear regression                               Number of obs     =      3,796
                                                F(8, 291)         =      14.88
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1626
                                                Root MSE          =     .75564

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.3162929   .0566768    -5.58   0.000    -.4278414   -.2047444
                 ln_capex |  -.0253805   .0421555    -0.60   0.548    -.1083488    .0575879
       D_ln_capex_missing |  -.3216413   .2169612    -1.48   0.139    -.7486534    .1053709
                 boi_year |  -.0035757   .0038338    -0.93   0.352    -.0111212    .0039699
       D_boi_year_missing |  -6.947744   7.678986    -0.90   0.366    -22.06114    8.165649
              bh_ope_cost |   .0011377   .0003697     3.08   0.002     .0004101    .0018653
    D_bh_ope_cost_missing |   .1680808   .1789544     0.94   0.348    -.1841282    .5202897
ln_plant_total_heatoutput |   .4074205   .0727941     5.60   0.000     .2641509    .5506902
                    _cons |   7.726619   7.559199     1.02   0.308    -7.151016    22.60425
-------------------------------------------------------------------------------------------

added macro:
           e(Month_FE) : ""

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : "Rule B"

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.875352    .8468288   2.594657   9.746841

added macro:
          e(Ctrl_Mean) : "6.88"

added macro:
              e(space) : ""
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,796
Absorbing 1 HDFE group                            F(   8,    291) =      14.83
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2548
                                                  Adj R-squared   =     0.2508
                                                  Within R-sq.    =     0.1791
Number of clusters (gpcb_id) =        292         Root MSE        =     0.7140

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.3162929   .0567668    -5.57   0.000    -.4280185   -.2045673
                 ln_capex |  -.0253805   .0422224    -0.60   0.548    -.1084805    .0577196
       D_ln_capex_missing |  -.3216413   .2173058    -1.48   0.140    -.7493316     .106049
                 boi_year |  -.0035757   .0038399    -0.93   0.353    -.0111332    .0039819
       D_boi_year_missing |  -6.947744   7.691181    -0.90   0.367    -22.08514    8.189651
              bh_ope_cost |   .0011377   .0003703     3.07   0.002     .0004089    .0018665
    D_bh_ope_cost_missing |   .1680808   .1792386     0.94   0.349    -.1846875    .5208491
ln_plant_total_heatoutput |   .4074205   .0729097     5.59   0.000     .2639233    .5509178
                    _cons |   7.726619   7.571204     1.02   0.308    -7.174643    22.62788
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

added macro:
           e(Month_FE) : "Yes"

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : "Rule B"

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.875352    .8468288   2.594657   9.746841

added macro:
          e(Ctrl_Mean) : "6.88"

added macro:
              e(space) : ""
(file 03Output/tables/Table_3.tex not found)
(output written to 03Output/tables/Table_3.tex)
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)
(2,336 observations deleted)
(876 observations deleted)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,899    6.517455    .8309767   2.654804   10.23472

    Result                      Number of obs
    -----------------------------------------
    Not matched                         3,837
        from master                         0  (_merge==1)
        from using                      3,837  (_merge==2)

    Matched                             3,796  (_merge==3)
    -----------------------------------------
(3,837 observations deleted)

Linear regression                               Number of obs     =      3,235
                                                F(9, 291)         =       9.00
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1333
                                                Root MSE          =     .87382

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.1786264   .0769763    -2.32   0.021    -.3301273   -.0271256
                 ln_capex |  -.0243103   .0553256    -0.44   0.661    -.1331993    .0845788
       D_ln_capex_missing |  -.3862445   .2885217    -1.34   0.182    -.9540984    .1816094
                 boi_year |  -.0037378    .004739    -0.79   0.431    -.0130649    .0055893
       D_boi_year_missing |  -7.269765    9.49321    -0.77   0.444    -25.95382    11.41429
              bh_ope_cost |   .0011643   .0004137     2.81   0.005       .00035    .0019785
    D_bh_ope_cost_missing |   .2408389   .2375745     1.01   0.312    -.2267433     .708421
ln_plant_total_heatoutput |   .4830358   .0866813     5.57   0.000      .312434    .6536376
             stack_DA_day |   .0000343    .001339     0.03   0.980    -.0026012    .0026697
                    _cons |   6.663832   9.424154     0.71   0.480    -11.88431    25.21198
-------------------------------------------------------------------------------------------

added macro:
           e(Month_FE) : ""

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : ""

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,336     6.66665    1.064623   1.545703   9.746841

added macro:
          e(Ctrl_Mean) : "6.67"

added macro:
              e(space) : ""
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,235
Absorbing 1 HDFE group                            F(   9,    291) =       9.25
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1752
                                                  Adj R-squared   =     0.1698
                                                  Within R-sq.    =     0.1430
Number of clusters (gpcb_id) =        292         Root MSE        =     0.8540

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.2030126   .0769198    -2.64   0.009    -.3544023   -.0516229
                 ln_capex |  -.0291783   .0547523    -0.53   0.594     -.136939    .0785823
       D_ln_capex_missing |  -.4075526   .2854215    -1.43   0.154    -.9693049    .1541997
                 boi_year |  -.0035576   .0047087    -0.76   0.451     -.012825    .0057098
       D_boi_year_missing |  -6.904609   9.432019    -0.73   0.465    -25.46823    11.65901
              bh_ope_cost |   .0012071   .0004188     2.88   0.004     .0003828    .0020314
    D_bh_ope_cost_missing |   .2748813   .2337142     1.18   0.240    -.1851032    .7348657
ln_plant_total_heatoutput |   .4852014   .0860938     5.64   0.000     .3157559    .6546468
             stack_DA_day |   .0012727   .0013715     0.93   0.354    -.0014265    .0039719
                    _cons |   6.193984   9.355865     0.66   0.508    -12.21976    24.60773
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

added macro:
           e(Month_FE) : "Yes"

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : ""

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,336     6.66665    1.064623   1.545703   9.746841

added macro:
          e(Ctrl_Mean) : "6.67"

added macro:
              e(space) : ""
(sum of wgt is 10.99111042683944)

Linear regression                               Number of obs     =      3,235
                                                F(9, 291)         =       9.21
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1355
                                                Root MSE          =     .86482

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.1799147   .0759338    -2.37   0.018    -.3293637   -.0304657
                 ln_capex |  -.0275452   .0544899    -0.51   0.614    -.1347894     .079699
       D_ln_capex_missing |   -.399815   .2861807    -1.40   0.163    -.9630613    .1634314
                 boi_year |  -.0036686   .0048495    -0.76   0.450    -.0132132     .005876
       D_boi_year_missing |  -7.137867   9.715671    -0.73   0.463    -26.25976    11.98403
              bh_ope_cost |   .0011307   .0004052     2.79   0.006     .0003333    .0019282
    D_bh_ope_cost_missing |   .2531059   .2338348     1.08   0.280     -.207116    .7133279
ln_plant_total_heatoutput |   .4860593   .0858602     5.66   0.000     .3170736    .6550449
             stack_DA_day |   .0003253   .0012921     0.25   0.801    -.0022178    .0028684
                    _cons |   6.459957   9.650996     0.67   0.504    -12.53465    25.45456
-------------------------------------------------------------------------------------------

added macro:
           e(Month_FE) : ""

added macro:
         e(Reweighted) : "Yes"

added macro:
           e(Imp_Rule) : ""

added macro:
           e(N_Plants) : "292"

    Variable |     Obs      Weight        Mean   Std. dev.       Min        Max
-------------+-----------------------------------------------------------------
   lnY_rule0 |   1,336  4.48073035    6.655505    1.05112   1.545703   9.746841

added macro:
          e(Ctrl_Mean) : "6.66"

added macro:
              e(space) : ""
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,235
Absorbing 1 HDFE group                            F(   9,    291) =       9.45
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1736
                                                  Adj R-squared   =     0.1682
                                                  Within R-sq.    =     0.1452
Number of clusters (gpcb_id) =        292         Root MSE        =     0.8471

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.2070271   .0758025    -2.73   0.007    -.3562177   -.0578365
                 ln_capex |  -.0321831   .0539706    -0.60   0.551    -.1384052     .074039
       D_ln_capex_missing |  -.4195456   .2834458    -1.48   0.140    -.9774092     .138318
                 boi_year |  -.0036928   .0048277    -0.76   0.445    -.0131943    .0058087
       D_boi_year_missing |  -7.182767   9.671523    -0.74   0.458    -26.21777    11.85224
              bh_ope_cost |   .0011685   .0004114     2.84   0.005     .0003589    .0019782
    D_bh_ope_cost_missing |   .2847453    .232621     1.22   0.222    -.1730876    .7425782
ln_plant_total_heatoutput |   .4898115    .085619     5.72   0.000     .3213006    .6583224
             stack_DA_day |   .0014831   .0013336     1.11   0.267    -.0011416    .0041079
                    _cons |   6.383475   9.599574     0.66   0.507    -12.50992    25.27687
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

added macro:
           e(Month_FE) : "Yes"

added macro:
         e(Reweighted) : "Yes"

added macro:
           e(Imp_Rule) : ""

added macro:
           e(N_Plants) : "292"

    Variable |     Obs      Weight        Mean   Std. dev.       Min        Max
-------------+-----------------------------------------------------------------
   lnY_rule0 |   1,336  4.48073035    6.655505    1.05112   1.545703   9.746841

added macro:
          e(Ctrl_Mean) : "6.66"

added macro:
              e(space) : ""
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)
(2,336 observations deleted)
(876 observations deleted)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      2,028     6.54332    .7929016   2.654804   10.26545

    Result                      Number of obs
    -----------------------------------------
    Not matched                         3,837
        from master                         0  (_merge==1)
        from using                      3,837  (_merge==2)

    Matched                             3,796  (_merge==3)
    -----------------------------------------
(3,837 observations deleted)
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000005 saved as .dta format

Linear regression                               Number of obs     =      3,796
                                                F(9, 291)         =      11.39
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1872
                                                Root MSE          =     .79728

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.2403051   .0734777    -3.27   0.001    -.3849203     -.09569
                 ln_capex |  -.0124026   .0511075    -0.24   0.808    -.1129898    .0881846
       D_ln_capex_missing |  -.3727835   .2689535    -1.39   0.167    -.9021242    .1565571
                 boi_year |  -.0026267   .0049417    -0.53   0.595    -.0123528    .0070994
       D_boi_year_missing |  -5.059165   9.904938    -0.51   0.610    -24.55356    14.43523
              bh_ope_cost |   .0010764   .0004039     2.67   0.008     .0002815    .0018712
    D_bh_ope_cost_missing |   .3539454   .2346652     1.51   0.133    -.1079107    .8158016
ln_plant_total_heatoutput |    .506608   .0868447     5.83   0.000     .3356847    .6775313
             stack_DA_day |  -.0022238   .0008009    -2.78   0.006    -.0038002   -.0006475
                    _cons |   4.294505   9.914724     0.43   0.665    -15.21916    23.80817
-------------------------------------------------------------------------------------------

added macro:
           e(Month_FE) : ""

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : "Rule A"

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.795791    .9593052   2.594657   9.770634

added macro:
          e(Ctrl_Mean) : "6.80"

added macro:
              e(space) : ""
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,796
Absorbing 1 HDFE group                            F(   9,    291) =      11.21
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2204
                                                  Adj R-squared   =     0.2161
                                                  Within R-sq.    =     0.1918
Number of clusters (gpcb_id) =        292         Root MSE        =     0.7820

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.2469496    .073463    -3.36   0.001    -.3915357   -.1023634
                 ln_capex |  -.0138015   .0512007    -0.27   0.788    -.1145722    .0869692
       D_ln_capex_missing |  -.3776197   .2691367    -1.40   0.162     -.907321    .1520816
                 boi_year |  -.0025153   .0049466    -0.51   0.611     -.012251    .0072204
       D_boi_year_missing |  -4.835411    9.91476    -0.49   0.626    -24.34914    14.67832
              bh_ope_cost |   .0010785   .0004062     2.66   0.008     .0002791    .0018779
    D_bh_ope_cost_missing |   .3544525   .2341744     1.51   0.131    -.1064378    .8153427
ln_plant_total_heatoutput |   .5068219   .0869982     5.83   0.000     .3355964    .6780474
             stack_DA_day |  -.0018706   .0008646    -2.16   0.031    -.0035722   -.0001689
                    _cons |   4.050516   9.924401     0.41   0.683    -15.48219    23.58322
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

added macro:
           e(Month_FE) : "Yes"

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : "Rule A"

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.795791    .9593052   2.594657   9.770634

added macro:
          e(Ctrl_Mean) : "6.80"

added macro:
              e(space) : ""
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)
(2,336 observations deleted)
(876 observations deleted)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      2,028    6.586923    .7810047   2.654804   10.24236

    Result                      Number of obs
    -----------------------------------------
    Not matched                         3,837
        from master                         0  (_merge==1)
        from using                      3,837  (_merge==2)

    Matched                             3,796  (_merge==3)
    -----------------------------------------
(3,837 observations deleted)

Linear regression                               Number of obs     =      3,796
                                                F(9, 291)         =      25.51
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1910
                                                Root MSE          =     .74279

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.2326119   .0611925    -3.80   0.000     -.353048   -.1121759
                 ln_capex |  -.0077621   .0429819    -0.18   0.857    -.0923569    .0768327
       D_ln_capex_missing |  -.2607338   .2183051    -1.19   0.233    -.6903908    .1689232
                 boi_year |  -.0049783   .0038044    -1.31   0.192    -.0124659    .0025093
       D_boi_year_missing |  -9.765729   7.619082    -1.28   0.201    -24.76122    5.229764
              bh_ope_cost |   .0011107   .0003499     3.17   0.002     .0004221    .0017994
    D_bh_ope_cost_missing |   .1616952   .1750776     0.92   0.356    -.1828838    .5062741
ln_plant_total_heatoutput |   .4047267   .0715757     5.65   0.000      .263855    .5455984
             stack_DA_day |  -.0044492    .000612    -7.27   0.000    -.0056537   -.0032448
                    _cons |   10.79945   7.517849     1.44   0.152    -3.996804     25.5957
-------------------------------------------------------------------------------------------

added macro:
           e(Month_FE) : ""

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : "Rule B"

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.875352    .8468288   2.594657   9.746841

added macro:
          e(Ctrl_Mean) : "6.88"

added macro:
              e(space) : ""
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,796
Absorbing 1 HDFE group                            F(   9,    291) =      23.64
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2712
                                                  Adj R-squared   =     0.2671
                                                  Within R-sq.    =     0.1971
Number of clusters (gpcb_id) =        292         Root MSE        =     0.7062

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.2504277   .0612005    -4.09   0.000    -.3708794    -.129976
                 ln_capex |  -.0115131   .0428813    -0.27   0.789      -.09591    .0728838
       D_ln_capex_missing |  -.2737011   .2181067    -1.25   0.211    -.7029677    .1555655
                 boi_year |  -.0046797   .0038139    -1.23   0.221    -.0121861    .0028267
       D_boi_year_missing |  -9.165776   7.638365    -1.20   0.231    -24.19922    5.867669
              bh_ope_cost |   .0011165   .0003543     3.15   0.002     .0004191    .0018138
    D_bh_ope_cost_missing |   .1630547   .1754789     0.93   0.354    -.1823141    .5084234
ln_plant_total_heatoutput |   .4053002    .071821     5.64   0.000     .2639457    .5466547
             stack_DA_day |   -.003502   .0005949    -5.89   0.000    -.0046728   -.0023312
                    _cons |   10.14524   7.535461     1.35   0.179    -4.685676    24.97615
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

added macro:
           e(Month_FE) : "Yes"

added macro:
         e(Reweighted) : ""

added macro:
           e(Imp_Rule) : "Rule B"

added macro:
           e(N_Plants) : "292"

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.875352    .8468288   2.594657   9.746841

added macro:
          e(Ctrl_Mean) : "6.88"

added macro:
              e(space) : ""
(file 03Output/tables/Table_F5.tex not found)
(output written to 03Output/tables/Table_F5.tex)

. 
end of do-file

. 
. * Table F6 
. * Make regression table of treatment effect on PM interacted with covid
. do "$CODE_DIR/make_regression_table_covid_inter.do"

. /*******************************************************************************
> Purpose: Create Emissions regression table with post-covid interaction
> ****************************************************************************/
. 
. set more off

. clear matrix

. clear all

. pause on

. 
. local yvar "lnY_rule0"

. * When we have month dummies the dummy for post covid gets absorbed, so don't include it
. local regvar_full "1.D_treatment##1.post_covid"

. local regvar_sep "1.D_treatment#1.post_covid 1.D_treatment"

. 
. local cov_interest "ln_capex D_ln_capex_missing boi_year D_boi_year_missing bh_ope_cost D_bh_ope_cost_missing ln_plant_total_heatoutput"

. 
. ********************************************************************************
. **************************** Panel 0 - Unweighted ******************************
. ********************************************************************************
. use "$EMISSIONS_DATA_OUT/Rule0_Panel.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. keep if D_interregnum == 0
(2,336 observations deleted)

. keep if post_mock1 == 1 | post_mock2 == 1
(876 observations deleted)

. sum `yvar' if D_treatment == 1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,899    6.517455    .8309767   2.654804   10.23472

. local table_name tab_treatment_effect_PM

. gen post_covid = month16 > date("2020mar16", "YMD")

. 
. ** Column 1: treatment dummy & plant covariates
. eststo reg_1: reg `yvar' `regvar_full' `cov_interest', clus(gpcb_id)

Linear regression                               Number of obs     =      3,235
                                                F(10, 291)        =       9.48
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1385
                                                Root MSE          =     .87132

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.2107852   .0874495    -2.41   0.017     -.382899   -.0386715
             1.post_covid |  -.1727804   .0815269    -2.12   0.035    -.3332376   -.0123233
                          |
   D_treatment#post_covid |
                     1 1  |   .0652472   .0932524     0.70   0.485    -.1182875    .2487818
                          |
                 ln_capex |  -.0249689   .0552456    -0.45   0.652    -.1337005    .0837626
       D_ln_capex_missing |  -.3902583   .2880448    -1.35   0.177    -.9571735    .1766569
                 boi_year |  -.0036946   .0047358    -0.78   0.436    -.0130154    .0056261
       D_boi_year_missing |  -7.187574   9.486596    -0.76   0.449    -25.85861    11.48347
              bh_ope_cost |   .0011805   .0004156     2.84   0.005     .0003625    .0019986
    D_bh_ope_cost_missing |   .2471699   .2354245     1.05   0.295    -.2161808    .7105205
ln_plant_total_heatoutput |   .4817954   .0866043     5.56   0.000     .3113452    .6522456
                    _cons |   6.673887   9.399962     0.71   0.478    -11.82664    25.17442
-------------------------------------------------------------------------------------------

. estadd local Month_FE ""

added macro:
           e(Month_FE) : ""

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule ""

added macro:
           e(Imp_Rule) : ""

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "292"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,336     6.66665    1.064623   1.545703   9.746841

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.67"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ** Column 2: treatment dummy & plant covariates & month FE
. eststo reg_2: reghdfe `yvar' `regvar_sep'  `cov_interest', a(i.month16) clus(gpcb_id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,235
Absorbing 1 HDFE group                            F(   9,    291) =       9.20
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1749
                                                  Adj R-squared   =     0.1695
                                                  Within R-sq.    =     0.1426
Number of clusters (gpcb_id) =        292         Root MSE        =     0.8542

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
   D_treatment#post_covid |
                     1 1  |    .065616   .0944056     0.70   0.488    -.1201883    .2514203
                          |
            1.D_treatment |  -.2188765    .087825    -2.49   0.013    -.3917293   -.0460237
                 ln_capex |  -.0268653    .054905    -0.49   0.625    -.1349265    .0811959
       D_ln_capex_missing |  -.4004294   .2865795    -1.40   0.163    -.9644608     .163602
                 boi_year |  -.0036252   .0047051    -0.77   0.442    -.0128855    .0056351
       D_boi_year_missing |  -7.040565    9.42461    -0.75   0.456    -25.58961    11.50848
              bh_ope_cost |   .0012164   .0004169     2.92   0.004     .0003958     .002037
    D_bh_ope_cost_missing |   .2703873   .2339745     1.16   0.249    -.1901096    .7308841
ln_plant_total_heatoutput |   .4829011   .0860892     5.61   0.000     .3134648    .6523374
                    _cons |   6.458098   9.333172     0.69   0.490    -11.91098    24.82718
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

. estadd local Month_FE "Yes"

added macro:
           e(Month_FE) : "Yes"

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule ""

added macro:
           e(Imp_Rule) : ""

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "292"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,336     6.66665    1.064623   1.545703   9.746841

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.67"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ********************************************************************************
. **************************** Panel 0 - Reweighted ******************************
. ********************************************************************************
. 
. ** Column 3: treatment dummy & plant covariates
. eststo reg_3: reg `yvar' `regvar_full'  `cov_interest' [pw=newweight_normalized], clus(gpcb_id)
(sum of wgt is 10.99111042683944)

Linear regression                               Number of obs     =      3,235
                                                F(10, 291)        =       9.43
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1398
                                                Root MSE          =     .86282

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.2110751   .0845761    -2.50   0.013    -.3775334   -.0446168
             1.post_covid |  -.1591037   .0791616    -2.01   0.045    -.3149057   -.0033018
                          |
   D_treatment#post_covid |
                     1 1  |   .0668194   .0909948     0.73   0.463     -.112272    .2459109
                          |
                 ln_capex |  -.0277375   .0543868    -0.51   0.610    -.1347788    .0793039
       D_ln_capex_missing |  -.4021505   .2858814    -1.41   0.161    -.9648078    .1605068
                 boi_year |  -.0036882   .0048514    -0.76   0.448    -.0132366    .0058601
       D_boi_year_missing |  -7.180587   9.719444    -0.74   0.461    -26.30991    11.94873
              bh_ope_cost |   .0011472   .0004072     2.82   0.005     .0003458    .0019487
    D_bh_ope_cost_missing |   .2567272     .23249     1.10   0.270    -.2008478    .7143022
ln_plant_total_heatoutput |   .4847676   .0858551     5.65   0.000      .315792    .6537432
                    _cons |   6.613796   9.639048     0.69   0.493    -12.35729    25.58488
-------------------------------------------------------------------------------------------

. estadd local Month_FE ""

added macro:
           e(Month_FE) : ""

. estadd local Reweighted "Yes"

added macro:
         e(Reweighted) : "Yes"

. estadd local Imp_Rule ""

added macro:
           e(Imp_Rule) : ""

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "292"

. sum `yvar' [aw=newweight_normalized] if D_treatment == 0

    Variable |     Obs      Weight        Mean   Std. dev.       Min        Max
-------------+-----------------------------------------------------------------
   lnY_rule0 |   1,336  4.48073035    6.655505    1.05112   1.545703   9.746841

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.66"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ** Column 4: treatment dummy & plant covariates & month FE
. eststo reg_4: reghdfe `yvar' `regvar_sep'  `cov_interest' [pw=newweight_normalized], a(i.month16) clus(gpcb_id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,235
Absorbing 1 HDFE group                            F(   9,    291) =       9.40
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1731
                                                  Adj R-squared   =     0.1677
                                                  Within R-sq.    =     0.1447
Number of clusters (gpcb_id) =        292         Root MSE        =     0.8474

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
   D_treatment#post_covid |
                     1 1  |   .0716545   .0920929     0.78   0.437     -.109598     .252907
                          |
            1.D_treatment |  -.2236263   .0849673    -2.63   0.009    -.3908547   -.0563979
                 ln_capex |  -.0297387   .0540724    -0.55   0.583    -.1361612    .0766839
       D_ln_capex_missing |  -.4128452   .2845834    -1.45   0.148    -.9729479    .1472574
                 boi_year |  -.0037659    .004827    -0.78   0.436    -.0132661    .0057344
       D_boi_year_missing |  -7.329442   9.670189    -0.76   0.449    -26.36182    11.70294
              bh_ope_cost |   .0011805   .0004095     2.88   0.004     .0003746    .0019863
    D_bh_ope_cost_missing |   .2789151   .2326602     1.20   0.232     -.178995    .7368251
ln_plant_total_heatoutput |   .4868992   .0855899     5.69   0.000     .3184454     .655353
                    _cons |    6.68456   9.584088     0.70   0.486    -12.17836    25.54748
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

. estadd local Month_FE "Yes"

added macro:
           e(Month_FE) : "Yes"

. estadd local Reweighted "Yes"

added macro:
         e(Reweighted) : "Yes"

. estadd local Imp_Rule ""

added macro:
           e(Imp_Rule) : ""

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "292"

. sum `yvar' [aw=newweight_normalized] if D_treatment == 0

    Variable |     Obs      Weight        Mean   Std. dev.       Min        Max
-------------+-----------------------------------------------------------------
   lnY_rule0 |   1,336  4.48073035    6.655505    1.05112   1.545703   9.746841

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.66"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ********************************************************************************
. *********************************** Panel A ************************************
. ********************************************************************************
. 
. use "$EMISSIONS_DATA_OUT/RuleA_Panel.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. keep if D_interregnum == 0
(2,336 observations deleted)

. keep if post_mock1 == 1 | post_mock2 == 1
(876 observations deleted)

. sum `yvar' if D_treatment == 1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      2,028     6.54332    .7929016   2.654804   10.26545

. gen post_covid = month16 > date("2020mar16", "YMD")

. 
. ** Column 5: treatment dummy & plant covariates
. eststo reg_5: reg `yvar' `regvar_full'  `cov_interest', clus(gpcb_id)

Linear regression                               Number of obs     =      3,796
                                                F(10, 291)        =      12.49
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1856
                                                Root MSE          =     .79817

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |  -.3028143   .0773614    -3.91   0.000    -.4550732   -.1505554
             1.post_covid |   -.148936   .0473087    -3.15   0.002    -.2420467   -.0558254
                          |
   D_treatment#post_covid |
                     1 1  |   .0537759   .0602086     0.89   0.373    -.0647237    .1722754
                          |
                 ln_capex |  -.0212087   .0504293    -0.42   0.674    -.1204612    .0780437
       D_ln_capex_missing |  -.4032268   .2658849    -1.52   0.130     -.926528    .1200744
                 boi_year |  -.0019256   .0049793    -0.39   0.699    -.0117256    .0078744
       D_boi_year_missing |  -3.650655   9.979971    -0.37   0.715    -23.29273    15.99142
              bh_ope_cost |   .0010898   .0004146     2.63   0.009     .0002738    .0019058
    D_bh_ope_cost_missing |   .3571372   .2299888     1.55   0.122    -.0955152    .8097896
ln_plant_total_heatoutput |   .5079545   .0870918     5.83   0.000     .3365447    .6793642
                    _cons |   2.815901   9.995513     0.28   0.778    -16.85676    22.48856
-------------------------------------------------------------------------------------------

. estadd local Month_FE ""

added macro:
           e(Month_FE) : ""

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule "Rule A"

added macro:
           e(Imp_Rule) : "Rule A"

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "292"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.795791    .9593052   2.594657   9.770634

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.80"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ** Column 6: treatment dummy & plant covariates & month FE
. eststo reg_6: reghdfe `yvar' `regvar_sep' `cov_interest', a(i.month16) clus(gpcb_id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,796
Absorbing 1 HDFE group                            F(   9,    291) =      11.08
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2165
                                                  Adj R-squared   =     0.2122
                                                  Within R-sq.    =     0.1878
Number of clusters (gpcb_id) =        292         Root MSE        =     0.7840

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
   D_treatment#post_covid |
                     1 1  |   .0537759   .0602963     0.89   0.373    -.0648963     .172448
                          |
            1.D_treatment |  -.3028143   .0774741    -3.91   0.000    -.4552949   -.1503337
                 ln_capex |  -.0212087   .0505028    -0.42   0.675    -.1206058    .0781883
       D_ln_capex_missing |  -.4032268   .2662721    -1.51   0.131    -.9272901    .1208364
                 boi_year |  -.0019256   .0049865    -0.39   0.700    -.0117398    .0078886
       D_boi_year_missing |  -3.650655   9.994505    -0.37   0.715    -23.32133    16.02002
              bh_ope_cost |   .0010898   .0004152     2.62   0.009     .0002726     .001907
    D_bh_ope_cost_missing |   .3571372   .2303238     1.55   0.122    -.0961744    .8104487
ln_plant_total_heatoutput |   .5079545   .0872187     5.82   0.000     .3362951    .6796138
                    _cons |   2.758618   10.01006     0.28   0.783    -16.94269    22.45992
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

. estadd local Month_FE "Yes"

added macro:
           e(Month_FE) : "Yes"

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule "Rule A"

added macro:
           e(Imp_Rule) : "Rule A"

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "292"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.795791    .9593052   2.594657   9.770634

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.80"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ********************************************************************************
. *********************************** Panel B ************************************
. ********************************************************************************
. 
. use "$EMISSIONS_DATA_OUT/RuleB_Panel.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. keep if D_interregnum == 0
(2,336 observations deleted)

. keep if post_mock1 == 1 | post_mock2 == 1
(876 observations deleted)

. gen post_covid = month16 > date("2020mar16", "YMD")

. 
. ** Column 7: treatment dummy & plant covariates
. eststo reg_7: reg `yvar' `regvar_full' `cov_interest', clus(gpcb_id)

Linear regression                               Number of obs     =      3,796
                                                F(10, 291)        =      16.71
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1781
                                                Root MSE          =     .74878

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
            1.D_treatment |   -.371675   .0597219    -6.22   0.000    -.4892167   -.2541333
             1.post_covid |  -.2758939   .0587266    -4.70   0.000    -.3914767   -.1603112
                          |
   D_treatment#post_covid |
                     1 1  |   .1439935   .0709243     2.03   0.043     .0044038    .2835832
                          |
                 ln_capex |  -.0253805   .0421666    -0.60   0.548    -.1083707    .0576098
       D_ln_capex_missing |  -.3216413   .2170185    -1.48   0.139    -.7487662    .1054837
                 boi_year |  -.0035757   .0038348    -0.93   0.352    -.0111232    .0039719
       D_boi_year_missing |  -6.947744   7.681015    -0.90   0.366    -22.06513    8.169641
              bh_ope_cost |   .0011377   .0003698     3.08   0.002     .0004099    .0018655
    D_bh_ope_cost_missing |   .1680808   .1790016     0.94   0.349    -.1842212    .5203828
ln_plant_total_heatoutput |   .4074205   .0728133     5.60   0.000      .264113    .5507281
                    _cons |   7.832732   7.561416     1.04   0.301    -7.049265    22.71473
-------------------------------------------------------------------------------------------

. estadd local Month_FE ""

added macro:
           e(Month_FE) : ""

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule "Rule B"

added macro:
           e(Imp_Rule) : "Rule B"

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "292"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.875352    .8468288   2.594657   9.746841

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.88"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ** Column 8: treatment dummy & plant covariates & month FE
. eststo reg_8: reghdfe `yvar' `regvar_sep' `cov_interest', a(i.month16) clus(gpcb_id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,796
Absorbing 1 HDFE group                            F(   9,    291) =      14.11
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2566
                                                  Adj R-squared   =     0.2524
                                                  Within R-sq.    =     0.1811
Number of clusters (gpcb_id) =        292         Root MSE        =     0.7132

                                           (Std. err. adjusted for 292 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
   D_treatment#post_covid |
                     1 1  |   .1439935   .0710276     2.03   0.044     .0042005    .2837865
                          |
            1.D_treatment |   -.371675   .0598089    -6.21   0.000    -.4893879   -.2539622
                 ln_capex |  -.0253805    .042228    -0.60   0.548    -.1084916    .0577306
       D_ln_capex_missing |  -.3216413   .2173346    -1.48   0.140    -.7493883    .1061057
                 boi_year |  -.0035757   .0038404    -0.93   0.353    -.0111342    .0039829
       D_boi_year_missing |  -6.947744     7.6922    -0.90   0.367    -22.08714    8.191656
              bh_ope_cost |   .0011377   .0003703     3.07   0.002     .0004088    .0018666
    D_bh_ope_cost_missing |   .1680808   .1792623     0.94   0.349    -.1847343    .5208958
ln_plant_total_heatoutput |   .4074205   .0729194     5.59   0.000     .2639043    .5509368
                    _cons |   7.726619   7.572207     1.02   0.308    -7.176618    22.62986
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

. estadd local Month_FE "Yes"

added macro:
           e(Month_FE) : "Yes"

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule "Rule B"

added macro:
           e(Imp_Rule) : "Rule B"

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "292"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,768    6.875352    .8468288   2.594657   9.746841

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.88"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ********************************************************************************
. ************************************ Output ************************************
. ********************************************************************************
. 
. esttab reg_* ///
>   using "$EMISSIONS_TABS/Table_F6.tex", replace ///
>   se(3) ar2 booktabs varwidth(32) ///
>   keep(1.D_treatment 1.post_covid 1.D_treatment#1.post_covid) ///
>   coeflabel(1.D_treatment "ETS Treatment (=1)" 1.post_covid "Post-Covid (=1)" 1.D_treatment#1.post_covid "Treatment $\times$ Post-Covid") ///
>   mgroups("\shortstack{No Imputation}" "\shortstack{With Imputation}", pattern(1 0 0 0 1 0 0 0) ///
>           prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
>   nomtitles ///
>   stats(Month_FE space Imp_Rule Reweighted Ctrl_Mean r2 N_Plants N, ///
>           label("Year-Month FE" " " "Imputation rule" "Reweighted" "Mean dep. var (control)" "R\textsuperscript{2}" "Plants" "Observations" ) ///
>           fmt(%1s %1s %1s %1s %9.2f %9.2f 0 0)) ///
>   prefoot(" ") ///
>   star(* 0.10 ** 0.05 *** 0.01) nonotes
(file 03Output/tables/Table_F6.tex not found)
(output written to 03Output/tables/Table_F6.tex)

. 
end of do-file

. 
. * Table F8
. * Make regression table of treatment effect on PM interacted with device type
. do "$CODE_DIR/make_regression_table_device_fe.do"

. /*******************************************************************************
> Purpose: Create Emissions regression table with device type interaction
> ****************************************************************************/
. 
. set more off

. clear matrix

. clear all

. pause on

. 
. use "$EMISSIONS_DATA_IN/2. Historical Factors Preliminary Cleaned (Raw).dta", clear
(Historical Factors Appended (Raw))

. bysort gpcb_id device_type: keep if _n==1
(5,670 observations deleted)

. drop if device==.
(301 observations deleted)

. bysort gpcb_id: gen device_consol = device_type

. * A single industry might have devices of different types
. bysort gpcb_id: replace device_consol = 99 if _N==2
(54 real changes made)

. bysort gpcb_id: keep if _n==1
(27 observations deleted)

. keep gpcb_id device_consol

. tempfile device_types

. save `device_types'
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000001 saved as .dta format

. 
. local yvar "lnY_rule0"

. local regvar "i.D_treatment"

. local cov_interest "ln_capex D_ln_capex_missing boi_year D_boi_year_missing bh_ope_cost D_bh_ope_cost_missing ln_plant_total_heatoutput `regvar'##i.device_consol"

. 
. ********************************************************************************
. **************************** Panel 0 - Unweighted ******************************
. ********************************************************************************
. use "$EMISSIONS_DATA_OUT/Rule0_Panel.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. merge m:1 gpcb_id using `device_types', keep(3) nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             6,696  
    -----------------------------------------

. keep if D_interregnum == 0
(2,232 observations deleted)

. keep if post_mock1 == 1 | post_mock2 == 1
(837 observations deleted)

. sum `yvar' if D_treatment == 1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,876    6.517659    .8225701   2.654804   10.23472

. local table_name tab_treatment_effect_PM

. gen post_covid = month16 > date("2020mar16", "YMD")

. 
. ** Column 1: treatment dummy & plant covariates
. eststo reg_1: reg `yvar' `cov_interest', clus(gpcb_id)

Linear regression                               Number of obs     =      3,110
                                                F(12, 278)        =       6.70
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1376
                                                Root MSE          =     .86243

                                           (Std. err. adjusted for 279 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
                 ln_capex |  -.0025659   .0597409    -0.04   0.966    -.1201679    .1150361
       D_ln_capex_missing |   -.209394   .3090308    -0.68   0.499    -.8177316    .3989436
                 boi_year |  -.0045559   .0047938    -0.95   0.343    -.0139926    .0048808
       D_boi_year_missing |  -8.916909   9.604649    -0.93   0.354    -27.82399     9.99017
              bh_ope_cost |    .001167   .0003977     2.93   0.004     .0003841    .0019499
    D_bh_ope_cost_missing |   .1648923   .2428852     0.68   0.498    -.3132355    .6430201
ln_plant_total_heatoutput |   .4385022   .0909249     4.82   0.000     .2595135     .617491
            1.D_treatment |  -.1298927   .0872801    -1.49   0.138    -.3017066    .0419211
                          |
            device_consol |
                       2  |   .1591874   .2190623     0.73   0.468    -.2720441    .5904189
                      99  |   .3615605   .2120363     1.71   0.089    -.0558401     .778961
                          |
D_treatment#device_consol |
                    1  2  |  -.0910399   .2643213    -0.34   0.731    -.6113654    .4292857
                    1 99  |   -.318654   .2692144    -1.18   0.238    -.8486117    .2113037
                          |
                    _cons |   8.839446   9.542449     0.93   0.355    -9.945189    27.62408
-------------------------------------------------------------------------------------------

. estadd local Month_FE ""

added macro:
           e(Month_FE) : ""

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule ""

added macro:
           e(Imp_Rule) : ""

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "279"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,234    6.645395    1.061844   1.545703   9.496551

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.65"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ** Column 2: treatment dummy & plant covariates & month FE
. eststo reg_2: reghdfe `yvar'   `cov_interest', a(i.month16) clus(gpcb_id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,110
Absorbing 1 HDFE group                            F(  12,    278) =       6.76
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1773
                                                  Adj R-squared   =     0.1709
                                                  Within R-sq.    =     0.1466
Number of clusters (gpcb_id) =        279         Root MSE        =     0.8440

                                           (Std. err. adjusted for 279 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
                 ln_capex |  -.0076965   .0600289    -0.13   0.898    -.1258655    .1104724
       D_ln_capex_missing |  -.2352472   .3102509    -0.76   0.449    -.8459866    .3754922
                 boi_year |  -.0044556   .0047484    -0.94   0.349     -.013803    .0048919
       D_boi_year_missing |  -8.714407   9.512584    -0.92   0.360    -27.44025    10.01144
              bh_ope_cost |    .001217   .0004045     3.01   0.003     .0004207    .0020133
    D_bh_ope_cost_missing |   .1950079   .2400442     0.81   0.417    -.2775272     .667543
ln_plant_total_heatoutput |   .4389914    .090759     4.84   0.000     .2603293    .6176535
            1.D_treatment |  -.1472848   .0873442    -1.69   0.093    -.3192248    .0246551
                          |
            device_consol |
                       2  |    .176995   .2205089     0.80   0.423    -.2570843    .6110743
                      99  |   .3536314    .208923     1.69   0.092    -.0576405    .7649033
                          |
D_treatment#device_consol |
                    1  2  |  -.0933894   .2663688    -0.35   0.726    -.6177455    .4309667
                    1 99  |  -.3022548   .2677697    -1.13   0.260    -.8293686     .224859
                          |
                    _cons |   8.656864   9.440627     0.92   0.360    -9.927331    27.24106
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

. estadd local Month_FE "Yes"

added macro:
           e(Month_FE) : "Yes"

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule ""

added macro:
           e(Imp_Rule) : ""

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "279"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,234    6.645395    1.061844   1.545703   9.496551

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.65"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ********************************************************************************
. **************************** Panel 0 - Reweighted ******************************
. ********************************************************************************
. 
. ** Column 3: treatment dummy & plant covariates
. eststo reg_3: reg `yvar'   `cov_interest' [pw=newweight_normalized], clus(gpcb_id)
(sum of wgt is 10.61041811760515)

Linear regression                               Number of obs     =      3,110
                                                F(12, 278)        =       6.94
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1399
                                                Root MSE          =     .85395

                                           (Std. err. adjusted for 279 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
                 ln_capex |  -.0058586   .0579672    -0.10   0.920     -.119969    .1082519
       D_ln_capex_missing |  -.2294655   .3030233    -0.76   0.450    -.8259772    .3670462
                 boi_year |   -.004443   .0048845    -0.91   0.364    -.0140584    .0051723
       D_boi_year_missing |  -8.700467   9.785924    -0.89   0.375    -27.96439    10.56346
              bh_ope_cost |    .001137   .0003909     2.91   0.004     .0003675    .0019065
    D_bh_ope_cost_missing |   .1810961   .2374763     0.76   0.446     -.286384    .6485763
ln_plant_total_heatoutput |   .4414568   .0899428     4.91   0.000     .2644013    .6185122
            1.D_treatment |  -.1350121    .085246    -1.58   0.114    -.3028217    .0327974
                          |
            device_consol |
                       2  |   .1406679   .2208461     0.64   0.525    -.2940751     .575411
                      99  |   .3617661   .2040812     1.77   0.077    -.0399746    .7635069
                          |
D_treatment#device_consol |
                    1  2  |  -.0638542   .2669196    -0.24   0.811    -.5892945    .4615861
                    1 99  |  -.3110774   .2664962    -1.17   0.244    -.8356841    .2135294
                          |
                    _cons |   8.578117   9.713521     0.88   0.378    -10.54328    27.69951
-------------------------------------------------------------------------------------------

. estadd local Month_FE ""

added macro:
           e(Month_FE) : ""

. estadd local Reweighted "Yes"

added macro:
         e(Reweighted) : "Yes"

. estadd local Imp_Rule ""

added macro:
           e(Imp_Rule) : ""

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "279"

. sum `yvar' [aw=newweight_normalized] if D_treatment == 0

    Variable |     Obs      Weight        Mean   Std. dev.       Min        Max
-------------+-----------------------------------------------------------------
   lnY_rule0 |   1,234  4.16810175    6.637503   1.047811   1.545703   9.496551

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.64"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ** Column 4: treatment dummy & plant covariates & month FE
. eststo reg_4: reghdfe `yvar'   `cov_interest' [pw=newweight_normalized], a(i.month16) clus(gpcb_id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,110
Absorbing 1 HDFE group                            F(  12,    278) =       6.98
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1763
                                                  Adj R-squared   =     0.1699
                                                  Within R-sq.    =     0.1488
Number of clusters (gpcb_id) =        279         Root MSE        =     0.8373

                                           (Std. err. adjusted for 279 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
                 ln_capex |  -.0101556   .0580861    -0.17   0.861    -.1245001     .104189
       D_ln_capex_missing |  -.2518447   .3037089    -0.83   0.408     -.849706    .3460167
                 boi_year |  -.0045468   .0048565    -0.94   0.350    -.0141069    .0050134
       D_boi_year_missing |   -8.90645   9.728873    -0.92   0.361    -28.05807    10.24517
              bh_ope_cost |    .001182   .0003994     2.96   0.003     .0003958    .0019682
    D_bh_ope_cost_missing |   .2082136   .2371304     0.88   0.381    -.2585857    .6750129
ln_plant_total_heatoutput |   .4428432   .0899929     4.92   0.000      .265689    .6199974
            1.D_treatment |  -.1540751   .0851775    -1.81   0.072    -.3217498    .0135996
                          |
            device_consol |
                       2  |     .15902   .2236894     0.71   0.478    -.2813202    .5993603
                      99  |   .3545612   .2011109     1.76   0.079    -.0413323    .7504548
                          |
D_treatment#device_consol |
                    1  2  |  -.0652154   .2706451    -0.24   0.810    -.5979894    .4675587
                    1 99  |  -.2994573   .2651732    -1.13   0.260    -.8214598    .2225453
                          |
                    _cons |   8.789161   9.646504     0.91   0.363    -10.20031    27.77863
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

. estadd local Month_FE "Yes"

added macro:
           e(Month_FE) : "Yes"

. estadd local Reweighted "Yes"

added macro:
         e(Reweighted) : "Yes"

. estadd local Imp_Rule ""

added macro:
           e(Imp_Rule) : ""

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "279"

. sum `yvar' [aw=newweight_normalized] if D_treatment == 0

    Variable |     Obs      Weight        Mean   Std. dev.       Min        Max
-------------+-----------------------------------------------------------------
   lnY_rule0 |   1,234  4.16810175    6.637503   1.047811   1.545703   9.496551

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.64"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ********************************************************************************
. *********************************** Panel A ************************************
. ********************************************************************************
. 
. use "$EMISSIONS_DATA_OUT/RuleA_Panel.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. merge m:1 gpcb_id using `device_types', keep(3) nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             6,696  
    -----------------------------------------

. keep if D_interregnum == 0
(2,232 observations deleted)

. keep if post_mock1 == 1 | post_mock2 == 1
(837 observations deleted)

. sum `yvar' if D_treatment == 1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,989    6.538656    .7937127   2.654804   10.26545

. gen post_covid = month16 > date("2020mar16", "YMD")

. 
. preserve

. rename `yvar' `yvar'_RuleA

. tempfile RuleA_Panel

. save `RuleA_Panel'
file /var/folders/7r/1zsrb09s0r578bq3nysvhzd40000gn/T//St34685.000003 saved as .dta format

. restore

. 
. ** Column 5: treatment dummy & plant covariates
. eststo reg_5: reg `yvar'   `cov_interest', clus(gpcb_id)

Linear regression                               Number of obs     =      3,627
                                                F(12, 278)        =       8.73
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1809
                                                Root MSE          =     .78404

                                           (Std. err. adjusted for 279 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
                 ln_capex |  -.0096907   .0551141    -0.18   0.861    -.1181846    .0988032
       D_ln_capex_missing |  -.2720279    .288073    -0.94   0.346    -.8391095    .2950537
                 boi_year |  -.0025015   .0050292    -0.50   0.619    -.0124018    .0073987
       D_boi_year_missing |  -4.810564   10.08062    -0.48   0.634     -24.6546    15.03348
              bh_ope_cost |    .001021   .0003923     2.60   0.010     .0002488    .0017933
    D_bh_ope_cost_missing |   .2869051   .2353702     1.22   0.224    -.1764292    .7502395
ln_plant_total_heatoutput |   .4698507   .0906266     5.18   0.000     .2914491    .6482523
            1.D_treatment |  -.2472259   .0835596    -2.96   0.003    -.4117159    -.082736
                          |
            device_consol |
                       2  |   .0954636   .1729426     0.55   0.581    -.2449799    .4359071
                      99  |   .2891348   .2101849     1.38   0.170    -.1246213    .7028909
                          |
D_treatment#device_consol |
                    1  2  |  -.0055606    .227934    -0.02   0.981    -.4542564    .4431352
                    1 99  |   -.228775   .2613635    -0.88   0.382    -.7432779     .285728
                          |
                    _cons |   4.399167   10.11176     0.44   0.664    -15.50619    24.30452
-------------------------------------------------------------------------------------------

. estadd local Month_FE ""

added macro:
           e(Month_FE) : ""

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule "Rule A"

added macro:
           e(Imp_Rule) : "Rule A"

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "279"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,638    6.764976     .929329   2.594657   9.496551

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.76"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ** Column 6: treatment dummy & plant covariates & month FE
. eststo reg_6: reghdfe `yvar'  `cov_interest', a(i.month16) clus(gpcb_id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,627
Absorbing 1 HDFE group                            F(  12,    278) =       8.70
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2182
                                                  Adj R-squared   =     0.2130
                                                  Within R-sq.    =     0.1879
Number of clusters (gpcb_id) =        279         Root MSE        =     0.7672

                                           (Std. err. adjusted for 279 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
                 ln_capex |  -.0096907   .0552058    -0.18   0.861    -.1183652    .0989838
       D_ln_capex_missing |  -.2720279   .2885525    -0.94   0.347    -.8400533    .2959975
                 boi_year |  -.0025015   .0050376    -0.50   0.620    -.0124183    .0074152
       D_boi_year_missing |  -4.810564    10.0974    -0.48   0.634    -24.68763    15.06651
              bh_ope_cost |    .001021    .000393     2.60   0.010     .0002475    .0017946
    D_bh_ope_cost_missing |   .2869051    .235762     1.22   0.225    -.1772003    .7510106
ln_plant_total_heatoutput |   .4698507   .0907775     5.18   0.000     .2911522    .6485493
            1.D_treatment |  -.2472259   .0836987    -2.95   0.003    -.4119896   -.0824622
                          |
            device_consol |
                       2  |   .0954636   .1732305     0.55   0.582    -.2455465    .4364737
                      99  |   .2891348   .2105347     1.37   0.171      -.12531    .7035796
                          |
D_treatment#device_consol |
                    1  2  |  -.0055606   .2283134    -0.02   0.981    -.4550032     .443882
                    1 99  |   -.228775   .2617985    -0.87   0.383    -.7441342    .2865843
                          |
                    _cons |   4.399167   10.12859     0.43   0.664    -15.53931    24.33765
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

. estadd local Month_FE "Yes"

added macro:
           e(Month_FE) : "Yes"

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule "Rule A"

added macro:
           e(Imp_Rule) : "Rule A"

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "279"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,638    6.764976     .929329   2.594657   9.496551

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.76"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ********************************************************************************
. *********************************** Panel B ************************************
. ********************************************************************************
. 
. use "$EMISSIONS_DATA_OUT/RuleB_Panel.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. merge m:1 gpcb_id using `device_types', keep(3) nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             6,696  
    -----------------------------------------

. keep if D_interregnum == 0
(2,232 observations deleted)

. keep if post_mock1 == 1 | post_mock2 == 1
(837 observations deleted)

. gen post_covid = month16 > date("2020mar16", "YMD")

. 
. ** Column 7: treatment dummy & plant covariates
. eststo reg_7: reg `yvar'  `cov_interest', clus(gpcb_id)

Linear regression                               Number of obs     =      3,627
                                                F(12, 278)        =      10.26
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1687
                                                Root MSE          =     .75355

                                           (Std. err. adjusted for 279 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
                 ln_capex |  -.0108399   .0475266    -0.23   0.820    -.1043976    .0827178
       D_ln_capex_missing |   -.187398   .2380443    -0.79   0.432    -.6559962    .2812002
                 boi_year |  -.0028053   .0039153    -0.72   0.474    -.0105127    .0049022
       D_boi_year_missing |    -5.4069   7.845212    -0.69   0.491    -20.85047    10.03667
              bh_ope_cost |   .0010838   .0003514     3.08   0.002      .000392    .0017755
    D_bh_ope_cost_missing |   .1114421   .1778333     0.63   0.531    -.2386287     .461513
ln_plant_total_heatoutput |    .384413   .0769283     5.00   0.000      .232977     .535849
            1.D_treatment |  -.3104735   .0645353    -4.81   0.000    -.4375134   -.1834336
                          |
            device_consol |
                       2  |    .126026   .1364896     0.92   0.357    -.1426584    .3947103
                      99  |   .1790823   .1560498     1.15   0.252    -.1281071    .4862717
                          |
D_treatment#device_consol |
                    1  2  |  -.0494736   .1897962    -0.26   0.795    -.4230938    .3241466
                    1 99  |  -.0798203   .2135165    -0.37   0.709    -.5001348    .3404942
                          |
                    _cons |   6.442917   7.772314     0.83   0.408    -8.857148    21.74298
-------------------------------------------------------------------------------------------

. estadd local Month_FE ""

added macro:
           e(Month_FE) : ""

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule "Rule B"

added macro:
           e(Imp_Rule) : "Rule B"

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "279"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,638    6.866814    .8466781   2.594657   9.496551

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.87"

. estadd local space ""

added macro:
              e(space) : ""

. 
. ** Column 8: treatment dummy & plant covariates & month FE
. eststo reg_8: reghdfe `yvar'  `cov_interest', a(i.month16) clus(gpcb_id)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      3,627
Absorbing 1 HDFE group                            F(  12,    278) =      10.23
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2615
                                                  Adj R-squared   =     0.2566
                                                  Within R-sq.    =     0.1860
Number of clusters (gpcb_id) =        279         Root MSE        =     0.7114

                                           (Std. err. adjusted for 279 clusters in gpcb_id)
-------------------------------------------------------------------------------------------
                          |               Robust
                lnY_rule0 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------------------+----------------------------------------------------------------
                 ln_capex |  -.0108399   .0476057    -0.23   0.820    -.1045533    .0828736
       D_ln_capex_missing |   -.187398   .2384405    -0.79   0.433    -.6567761    .2819801
                 boi_year |  -.0028053   .0039219    -0.72   0.475    -.0105255     .004915
       D_boi_year_missing |    -5.4069   7.858269    -0.69   0.492    -20.87617    10.06237
              bh_ope_cost |   .0010838    .000352     3.08   0.002     .0003909    .0017767
    D_bh_ope_cost_missing |   .1114421   .1781293     0.63   0.532    -.2392114    .4620956
ln_plant_total_heatoutput |    .384413   .0770563     4.99   0.000      .232725     .536101
            1.D_treatment |  -.3104735   .0646427    -4.80   0.000    -.4377248   -.1832221
                          |
            device_consol |
                       2  |    .126026   .1367167     0.92   0.357    -.1431056    .3951575
                      99  |   .1790823   .1563096     1.15   0.253    -.1286184     .486783
                          |
D_treatment#device_consol |
                    1  2  |  -.0494736   .1901121    -0.26   0.795    -.4237157    .3247685
                    1 99  |  -.0798203   .2138719    -0.37   0.709    -.5008344    .3411938
                          |
                    _cons |   6.442917    7.78525     0.83   0.409    -8.882612    21.76845
-------------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     month16 |        13           0          13     |
-----------------------------------------------------+

. estadd local Month_FE "Yes"

added macro:
           e(Month_FE) : "Yes"

. estadd local Reweighted ""

added macro:
         e(Reweighted) : ""

. estadd local Imp_Rule "Rule B"

added macro:
           e(Imp_Rule) : "Rule B"

. estadd local N_Plants = e(N_clust)

added macro:
           e(N_Plants) : "279"

. sum `yvar' if D_treatment == 0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   lnY_rule0 |      1,638    6.866814    .8466781   2.594657   9.496551

. estadd local Ctrl_Mean = string(r(mean), "%15.2f")

added macro:
          e(Ctrl_Mean) : "6.87"

. estadd local space ""

added macro:
              e(space) : ""

. 
. 
. ********************************************************************************
. ************************************ Output ************************************
. ********************************************************************************
. 
. esttab reg_* ///
>   using "$EMISSIONS_TABS/Table_F8.tex", replace ///
>   se(3) ar2 booktabs varwidth(32) ///
>   keep(1.D_treatment 2.device_consol 99.device_consol 1.D_treatment#2.device_consol 1.D_treatment#99.device_consol) ///
>   coeflabel(1.D_treatment "ETS Treatment (=1)" 2.device_consol "Device FE: Type 2" 99.device_consol "Device FE: Both Types" 1.D_treatment#2.device_consol "Treatment $\times$ Device FE: Type 2" 1.D_treatment#99.device_consol "Treatment $\times$ Device FE
> : Both Types") ///
>   mgroups("\shortstack{No Imputation}" "\shortstack{With Imputation}", pattern(1 0 0 0 1 0 0 0) ///
>           prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
>   nomtitles ///
>   stats(Month_FE space Imp_Rule Reweighted Ctrl_Mean r2 N_Plants N, ///
>           label("Year-Month FE" " " "Imputation rule" "Reweighted" "Mean dep. var (control)" "R\textsuperscript{2}" "Plants" "Observations" ) ///
>           fmt(%1s %1s %1s %1s %9.2f %9.2f 0 0)) ///
>   prefoot(" ") ///
>   star(* 0.10 ** 0.05 *** 0.01) nonotes
(file 03Output/tables/Table_F8.tex not found)
(output written to 03Output/tables/Table_F8.tex)

. 
end of do-file

. 
. * Table C1 and Figure C4
. do "$CODE_DIR/compare_imputation_rules.do"

. /*******************************************************************************
>            Purpose: Produce a table of mean of log(PM emissions) by imputation rules
>                                 and kernel density plots of emissions by treatment status.
>    ****************************************************************************/
. 
. set more off

. clear all

. pause on

. 
. use "$IMPUTATION_DATA_OUT/PlantMonthPMMassNoRule.dta", clear
(337 STACKS. MASTER T&C BALANCED PANEL. HIST CALIB FACTORS.)

. keep gpcb_id treatmentstatus month16 ind_month_mass_val_rule0

. rename ind_month_mass_val_rule0 Y

. 
. merge 1:1 gpcb_id month16 using "$IMPUTATION_DATA_OUT/PlantMonthPMMassRule0.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             7,008  (_merge==3)
    -----------------------------------------

. keep gpcb_id treatmentstatus month16 Y ind_month_mass_val_rule0

. rename ind_month_mass_val_rule0 Y_0

. 
. merge 1:1 gpcb_id month16 using "$IMPUTATION_DATA_OUT/PlantMonthPMMassRuleA.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             7,008  (_merge==3)
    -----------------------------------------

. keep gpcb_id treatmentstatus month16 Y* ind_month_mass_val_rule0

. rename ind_month_mass_val_rule0 Y_A

. 
. merge 1:1 gpcb_id month16 using "$IMPUTATION_DATA_OUT/PlantMonthPMMassRuleB.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             7,008  (_merge==3)
    -----------------------------------------

. keep gpcb_id treatmentstatus month16 Y* ind_month_mass_val_rule0

. rename ind_month_mass_val_rule0 Y_B

. 
. gen lnY = ln(Y)
(3,330 missing values generated)

. gen lnY_0 = ln(Y_0)
(1,827 missing values generated)

. gen lnY_A = ln(Y_A)
(2,121 missing values generated)

. gen lnY_B = ln(Y_B)

. 
. ** Generate interregnum dummy for period 16-Mar-2020 to 15-Oct-2020, 
. ** and month of 16-Nov-2020 (market was off for 2 weeks for Diwali in Nov 2020).
. gen D_interregnum = (month16 >= date("2020mar16", "YMD") & month16 <= date("2020sep16", "YMD")) | /// 
>         month16 == date("2020nov16", "YMD")

. label var D_interregnum "Interregnum"

. 
. ** Generate Mock 1: 16-Jul-2019 to 15-Sep-2019
. gen Mock1 = (month16 == date("2019jul16", "YMD") | month16 == date("2019aug16", "YMD") )

. label var Mock1 "Mock Trading 1 (pre-Covid)"

. 
. ** Generate Mock 2: 16-Oct-2020 to 15-Nov-2020
. gen Mock2 = month16 == date("2020oct16", "YMD")

. label var Mock2 "Mock Trading 2 (post-Covid)"   

. 
. ** Post1 is pre-interregnum only. 
. ** 16-Jul-2019 to 15-Mar-2020.
. gen post_mock1 = month16 >= date("2019jul16", "YMD") & month16 <= date("2020feb16", "YMD")

. label var post_mock1 "Post 1 (pre-Interregnum only)"

. 
. ** Post2 is post-interregnum only. 
. ** 16-Oct-2020 to 15-Nov-2020 & 16-Dec-2020 to 15-Feb-2021
. gen post_mock2 = month16 == date("2020oct16", "YMD") | month16 >= date("2020dec16", "YMD")

. label var post_mock2 "Post 2 (post-Interregnum only)"

. 
. keep if D_interregnum == 0
(2,336 observations deleted)

. keep if post_mock1 == 1 | post_mock2 == 1
(876 observations deleted)

. 
. ********************************************************************************
. * Table: Mean of the log(PM emissions) by imputation rules
. ********************************************************************************
. 
. matrix data = J(6, 3, 0)

. local counter = 0

. foreach var in lnY_0 lnY_A lnY_B {
  2. 
.         local counter = `counter' + 1
  3.         
.         sum `var' if treatmentstatus == "Control"
  4.         matrix data[2*`counter' -1, 1] = r(mean)
  5.         matrix data[2*`counter' , 1] = r(N)
  6. 
.         sum `var' if treatmentstatus == "Treatment"
  7.         matrix data[2*`counter' -1, 2] = r(mean)
  8.         matrix data[2*`counter', 2] = r(N)
  9. 
.         sum `var'
 10.         matrix data[2*`counter' -1, 3] = r(mean)
 11.         matrix data[2*`counter', 3] = r(N)
 12. 
. }

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       lnY_0 |      1,336     6.66665    1.064623   1.545703   9.746841

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       lnY_0 |      1,899    6.517455    .8309767   2.654804   10.23472

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       lnY_0 |      3,235     6.57907    .9373027   1.545703   10.23472

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       lnY_A |      1,768    6.795791    .9593052   2.594657   9.770634

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       lnY_A |      2,028     6.54332    .7929016   2.654804   10.26545

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       lnY_A |      3,796    6.660909    .8832623   2.594657   10.26545

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       lnY_B |      1,768    6.875352    .8468288   2.594657   9.746841

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       lnY_B |      2,028    6.586923    .7810047   2.654804   10.24236

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       lnY_B |      3,796     6.72126    .8248661   2.594657   10.24236

. preserve

. clear 

. 
. svmat double data, names(col)
number of observations will be reset to 6
Press any key to continue, or Break to abort
Number of observations (_N) was 0, now 6.

. * Cleanup vars
. foreach v of varlist * {
  2.         gen `v'_str = string(round(`v', 0.01), "%9.2f")
  3.         replace `v'_str = regexr(`v'_str, "\..*", "") if mod(_n, 2) == 0
  4.         replace `v'_str = "[" + `v'_str + "]" if mod(_n, 2) == 0
  5.         replace `v'_str = "\multicolumn{1}{c}{" + `v'_str + "}"
  6.         drop `v'
  7.         rename `v'_str `v'
  8. }
(3 real changes made)
(3 real changes made)
variable c1_str was str7 now str26
(6 real changes made)
(3 real changes made)
(3 real changes made)
variable c2_str was str7 now str26
(6 real changes made)
(3 real changes made)
(3 real changes made)
variable c3_str was str7 now str26
(6 real changes made)

. 
. 
. gen rname = "", before("c1")
(6 missing values generated)

. replace rname = "No Imputation" if _n == 1
variable rname was str1 now str13
(1 real change made)

. replace rname = "Rule A: Stack-Experiment" if _n == 3
variable rname was str13 now str24
(1 real change made)

. replace rname = "Rule B: Treatment-Month" if _n == 5
(1 real change made)

. 
.         
. listtex using "$EMISSIONS_TABS/Table_C1.tex", rstyle(tabular) replace ///
> headlines("\begin{tabular}{@{\extracolsep{2pt}}lD{.}{.}{-1}D{.}{.}{-1}D{.}{.}{-1}} \\[-1.8ex]\toprule \\[-1.8ex] & \multicolumn{1}{ >{\centering\arraybackslash}m{2cm} }{Control} & \multicolumn{1}{ >{\centering\arraybackslash}m{2cm} }{Treatment} & \multi
> column{1}{ >{\centering\arraybackslash}m{2cm} }{All}  \\ \\[-1.8ex] \hline \\[-1.8ex]") ///
> footlines("\bottomrule \\[-1.8ex]\end{tabular}")
(file 03Output/tables/Table_C1.tex not found)

. 
. 
. restore

. 
. 
. ********************************************************************************
. * Figure: Kernel density of PM emissions by treatment status
. ********************************************************************************
. 
. kdensity Y if treatmentstatus=="Treatment" & Y < 10000, lcolor("0 72 112") ///
>         addplot(kdensity Y_0 if treatmentstatus=="Treatment" & Y_0 < 10000, lcolor("163 43 58") || /// 
>                         kdensity Y_A if treatmentstatus=="Treatment" & Y_A < 10000, lcolor("71 118 41") || /// 
>                         kdensity Y_B if treatmentstatus=="Treatment" & Y_B < 10000, lcolor("252 118 0") ) ///
>         legend(cols(2) size(medsmall) region(lstyle(none)) position(6)) ///
>         legend(on order(1 "Stack-Week (N=1604)" 2 "Stack-Month (N=1899)" 3 "Stack-Experiment (N=2028)" 4 "Treatment-Month (N=2028)")) ///
>         title("Treatment", size(medium)) ///
>         xtitle("PM mass (kg / month)") ///
>         plotregion(color(white)) bgcolor(white) graphregion(color(white))

. graph export "$EMISSIONS_FIGS/Figure_C4_A_1.png", replace
(file 03Output/figures/Figure_C4_A_1.png not found)
file 03Output/figures/Figure_C4_A_1.png written in PNG format

. 
. 
. kdensity Y if treatmentstatus=="Control" & Y < 10000, lcolor("0 72 112") ///
>         addplot(kdensity Y_0 if treatmentstatus=="Control" & Y_0 < 10000, lcolor("163 43 58") || /// \
>                         kdensity Y_A if treatmentstatus=="Control" & Y_A < 10000, lcolor("71 118 41") || /// 
>                         kdensity Y_B if treatmentstatus=="Control" & Y_B < 10000, lcolor("252 118 0"))  ///
>         legend(cols(2) size(medsmall) region(lstyle(none)) position(6)) ///
>         legend(on order(1 "Stack-Week (N=997)" 2 "Stack-Month (N=1336)" 3 "Stack-Experiment (N=1768)" 4 "Treatment-Month (N=1768)")) ///
>         title("Control", size(medium)) ///
>         xtitle("PM mass (kg / month)") ///
>         plotregion(color(white)) bgcolor(white) graphregion(color(white))

. graph export "$EMISSIONS_FIGS/Figure_C4_A_2.png", replace
(file 03Output/figures/Figure_C4_A_2.png not found)
file 03Output/figures/Figure_C4_A_2.png written in PNG format

. 
. ********************************************************************************
. * Figure: Kernel density of log(PM emissions) by treatment status
. ********************************************************************************
. 
. kdensity lnY if treatmentstatus=="Treatment", lcolor("0 72 112") ///
>         addplot(kdensity lnY_0 if treatmentstatus=="Treatment", lcolor("163 43 58") || /// 
>                         kdensity lnY_A if treatmentstatus=="Treatment", lcolor("71 118 41") || /// 
>                         kdensity lnY_B if treatmentstatus=="Treatment", lcolor("252 118 0"))    ///
>         legend(cols(2) size(medsmall) region(lstyle(none)) position(6)) ///
>         legend(on order(1 "Stack-Week (N=1604)" 2 "Stack-Month (N=1899)" 3 "Stack-Experiment (N=2028)" 4 "Treatment-Month (N=2028)")) ///
>         title("Treatment", size(medium)) ///
>         xtitle("log[PM mass (kg / month)]") ///
>         plotregion(color(white)) bgcolor(white) graphregion(color(white))

. graph export "$EMISSIONS_FIGS/Figure_C4_B_1.png", replace
(file 03Output/figures/Figure_C4_B_1.png not found)
file 03Output/figures/Figure_C4_B_1.png written in PNG format

. 
. kdensity lnY if treatmentstatus=="Control", lcolor("0 72 112") ///
>         addplot(kdensity lnY_0 if treatmentstatus=="Control", lcolor("163 43 58")|| /// 
>                         kdensity lnY_A if treatmentstatus=="Control", lcolor("71 118 41") || /// 
>                         kdensity lnY_B if treatmentstatus=="Control", lcolor("252 118 0"))      ///
>         legend(cols(2) size(medsmall) region(lstyle(none)) position(6)) ///
>         legend(on order(1 "Stack-Week (N=997)" 2 "Stack-Month (N=1336)" 3 "Stack-Experiment (N=1768)" 4 "Treatment-Month (N=1768)")) ///
>         title("Control", size(medium)) ///
>         xtitle("log[PM mass (kg / month)]") ///
>         plotregion(color(white)) bgcolor(white) graphregion(color(white))

. graph export "$EMISSIONS_FIGS/Figure_C4_B_2.png", replace
(file 03Output/figures/Figure_C4_B_2.png not found)
file 03Output/figures/Figure_C4_B_2.png written in PNG format

. 
end of do-file

. 
. * Table C3
. do "$CODE_DIR/make_effect_of_cems_table.do"

. /*******
> Edits: Bogdan Mukhametkaliev
> Original: Jared Stolove (see Archive/Code/12. Table version main results)
> using new panel, using correct specification for cluster FE, and restructuring 
> the tables
> Purpose: Table summarizing treatment effects on PM
> Date edited: 09.21.21
> *******/
. 
. *** CEMS: 
. use "$CEMS_DATA_IN/CEMS Panel Monthly (clean, PO).dta", clear
(GPCB INSPECTIONS BY PLANT & INSPECTION DATE. 01-JAN-2014 THRU 30-MAY-2020. 370i.)

.         keep if !mi(treat) //phases II and IV only 
(7,084 observations deleted)

.         drop if (treat == 0) & (month > PO_month)
(3,559 observations deleted)

.         drop if (event_time < -24) | (event_time > 48)
(4,085 observations deleted)

.         gen treat_post = treat * post 

.         label var treat_post "Treatment Effect"

.         eststo clear

.         gen log_pm = log(avg_pm)
(12,617 missing values generated)

.         label var log_pm "Log(PM)"

.         label var avg_pm "PM, mg/Nm3"

.         
. foreach outcome in avg_pm log_pm{
  2.     eststo CEMS_`outcome'_plant:   reghdfe `outcome' treat_post, absorb(uniqid month) vce(cluster uniqid)
  3.                 estadd local monthyearFE "Yes"
  4.                 estadd local unitFE      "Yes"
  5.                 estadd scalar R2 e(r2)
  6.                 estadd ysumm
  7. }
(dropped 41 singleton observations)
(MWFE estimator converged in 11 iterations)

HDFE Linear regression                            Number of obs   =        796
Absorbing 2 HDFE groups                           F(   1,    196) =       0.00
Statistics robust to heteroskedasticity           Prob > F        =     0.9856
                                                  R-squared       =     0.3384
                                                  Adj R-squared   =     0.0151
                                                  Within R-sq.    =     0.0000
Number of clusters (uniqid)  =        197         Root MSE        =   137.5807

                               (Std. err. adjusted for 197 clusters in uniqid)
------------------------------------------------------------------------------
             |               Robust
      avg_pm | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
  treat_post |   .4321041   23.83781     0.02   0.986    -46.57943    47.44364
       _cons |   142.6433   8.834366    16.15   0.000     125.2206    160.0659
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
      uniqid |       197         197           0    *|
       month |        65           1          64     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

added macro:
        e(monthyearFE) : "Yes"

added macro:
             e(unitFE) : "Yes"

added scalar:
                 e(R2) =  .33842469

added scalars:
                e(ysd) =  138.62928
               e(ymax) =  1923
               e(ymin) =  6
              e(ymean) =  142.8034
(dropped 41 singleton observations)
(MWFE estimator converged in 11 iterations)

HDFE Linear regression                            Number of obs   =        796
Absorbing 2 HDFE groups                           F(   1,    196) =       0.44
Statistics robust to heteroskedasticity           Prob > F        =     0.5102
                                                  R-squared       =     0.4276
                                                  Adj R-squared   =     0.1478
                                                  Within R-sq.    =     0.0008
Number of clusters (uniqid)  =        197         Root MSE        =     0.5437

                               (Std. err. adjusted for 197 clusters in uniqid)
------------------------------------------------------------------------------
             |               Robust
      log_pm | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
  treat_post |  -.0601386   .0911513    -0.66   0.510    -.2399019    .1196247
       _cons |   4.779045    .033781   141.47   0.000     4.712424    4.845665
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
      uniqid |       197         197           0    *|
       month |        65           1          64     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

added macro:
        e(monthyearFE) : "Yes"

added macro:
             e(unitFE) : "Yes"

added scalar:
                 e(R2) =  .4275853

added scalars:
                e(ysd) =  .5889733
               e(ymax) =  7.5616417
               e(ymin) =  1.7917595
              e(ymean) =  4.7567571

. 
. esttab `tablist' using "$EMISSIONS_TABS/Table_C3.tex", ///
>                                  se star(* 0.10 "**" 0.05 "***" 0.01) label title("Effects of Treatment on PM") replace ///
>                                  drop( _cons ) prehead("\begin{tabular}{l*{2}{c}}\toprule") posthead("&\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}\\ \hline \addlinespace") nonumbers ///
>                                  prefoot("\addlinespace") postfoot("\bottomrule \end{tabular}") ///
>                                  scalars("monthyearFE Year-Month FE"   "unitFE Plant fixed effects"  "N_clust Plants" "R2 \$R^2$" "ymean Mean dependent variable") ///
>                                  sfmt(%3s %3s %8.0g %9.4f %9.3f)
(file 03Output/tables/Table_C3.tex not found)
(output written to 03Output/tables/Table_C3.tex)

. 
end of do-file

. 
end of do-file
